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).
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);
Deprecated: Use `absl::FromCivil(CivilSecond, TimeZone)`.. Use of this entity is allowed but discouraged.
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).
The "pre" absolute time for the given civil time in tz.
| 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. |