summaryrefslogtreecommitdiff
path: root/absl/time/internal/cctz/src/time_zone_if.h
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2021-10-08 15:00:10 -0700
committerGravatar dinord <dino.radakovich@gmail.com>2021-10-11 11:51:37 -0400
commit084aa074c6e3994471fcdb8f542d3a24916792de (patch)
treec49b974a4c1265dd33384310ecd61c1a61856586 /absl/time/internal/cctz/src/time_zone_if.h
parent4a995b1eaa4a602f0d3a9ff8eac89d4649cd2fe8 (diff)
Export of internal Abseil changes
-- 42dc250867db8816381a38596e00a3b27b7dbc37 by Gennadiy Rozental <rogeeff@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 401863616 GitOrigin-RevId: 42dc250867db8816381a38596e00a3b27b7dbc37 Change-Id: Ia1f100293e0c0845de76d986a170b5ca8d15f1a3
Diffstat (limited to 'absl/time/internal/cctz/src/time_zone_if.h')
-rw-r--r--absl/time/internal/cctz/src/time_zone_if.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/absl/time/internal/cctz/src/time_zone_if.h b/absl/time/internal/cctz/src/time_zone_if.h
index 32c0891c..7d3e42d3 100644
--- a/absl/time/internal/cctz/src/time_zone_if.h
+++ b/absl/time/internal/cctz/src/time_zone_if.h
@@ -56,7 +56,8 @@ class TimeZoneIf {
// Convert between time_point<seconds> and a count of seconds since the
// Unix epoch. We assume that the std::chrono::system_clock and the
-// Unix clock are second aligned, but not that they share an epoch.
+// Unix clock are second aligned, and that the results are representable.
+// (That is, that they share an epoch, which is required since C++20.)
inline std::int_fast64_t ToUnixSeconds(const time_point<seconds>& tp) {
return (tp - std::chrono::time_point_cast<seconds>(
std::chrono::system_clock::from_time_t(0)))