diff options
author | Abseil Team <absl-team@google.com> | 2021-03-23 15:07:11 -0700 |
---|---|---|
committer | Derek Mauro <dmauro@google.com> | 2021-03-24 08:58:27 -0400 |
commit | 1fdbe1ea1b8c835c11ed6fbec4d4259ad104f765 (patch) | |
tree | 4305af57d1416a50cb06522554569a7c9f7bf995 /absl/time | |
parent | f3eff479834e579111e195d8f9245050a4488eed (diff) |
Export of internal Abseil changes
--
4b566a7deeba5db473c83f4924c1d182a002779f by Abseil Team <absl-team@google.com>:
Add absl::LeakCheckerIsActive to check whether a leak checker is built into the
target and enabled. For LeakSanitizer, it is by default enabled unless
__lsan_is_turned_off() is defined and returns true.
PiperOrigin-RevId: 364654465
--
0a56ff5310b66f9d1ff5e5e2a053335ecfb5c75b by Abseil Team <absl-team@google.com>:
Update absl::FromTM documentation to reflect implementation.
PiperOrigin-RevId: 364388743
GitOrigin-RevId: 4b566a7deeba5db473c83f4924c1d182a002779f
Change-Id: I8df35b761b532e79d620f484153083c3499ef55b
Diffstat (limited to 'absl/time')
-rw-r--r-- | absl/time/time.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/absl/time/time.h b/absl/time/time.h index d9ad1aed..2df68581 100644 --- a/absl/time/time.h +++ b/absl/time/time.h @@ -1180,11 +1180,15 @@ inline Time FromDateTime(int64_t year, int mon, int day, int hour, // // Converts the `tm_year`, `tm_mon`, `tm_mday`, `tm_hour`, `tm_min`, and // `tm_sec` fields to an `absl::Time` using the given time zone. See ctime(3) -// for a description of the expected values of the tm fields. If the indicated -// time instant is not unique (see `absl::TimeZone::At(absl::CivilSecond)` -// above), the `tm_isdst` field is consulted to select the desired instant -// (`tm_isdst` > 0 means DST, `tm_isdst` == 0 means no DST, `tm_isdst` < 0 -// means use the post-transition offset). +// for a description of the expected values of the tm fields. If the civil time +// is unique (see `absl::TimeZone::At(absl::CivilSecond)` above), the matching +// time instant is returned. Otherwise, the `tm_isdst` field is consulted to +// choose between the possible results. For a repeated civil time, `tm_isdst != +// 0` returns the matching DST instant, while `tm_isdst == 0` returns the +// matching non-DST instant. For a skipped civil time there is no matching +// instant, so `tm_isdst != 0` returns the DST instant, and `tm_isdst == 0` +// returns the non-DST instant, that would have matched if the transition never +// happened. Time FromTM(const struct tm& tm, TimeZone tz); // ToTM() |