A convenience wrapper for absl::ConvertDateTime() that simply returns the "pre" absl::Time. That is, the unique result, or the instant that is correct using the pre‐transition offset (as if the transition never happened).

Synopsis

Declared in <absl/time/time.h>

[[deprecated("Use `absl::FromCivil(CivilSecond, TimeZone)`.")]]
Time
FromDateTime(
    int64_t year,
    int mon,
    int day,
    int hour,
    int min,
    int sec,
    TimeZone tz);
Warning

Deprecated: Use `absl::FromCivil(CivilSecond, TimeZone)`.. Use of this entity is allowed but discouraged.

Description

Example:

absl::Time t = absl::FromDateTime(2017, 9, 26, 9, 30, 0, lax); // t = 2017‐09‐26 09:30:00 ‐0700

Deprecated. Use absl::FromCivil(CivilSecond, TimeZone). Note that the behavior of FromCivil() differs from FromDateTime() for skipped civil times. If you care about that see absl::TimeZone::At(absl::CivilSecond).

Return Value

The "pre" absolute time for the given civil time in tz.

Parameters

Name

Description

year

The civil‐time year.

mon

The civil‐time month.

day

The civil‐time day.

hour

The civil‐time hour.

min

The civil‐time minute.

sec

The civil‐time second.

tz

The time zone to convert in.

Created with MrDocs