about summary refs log tree commit diff
path: root/absl/time/internal
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2018-10-15T18·30-0700
committerXiaoyi Zhang <zhangxy988@gmail.com>2018-10-15T19·32-0400
commit5b70a8910b2e6fb0ce5193a41873139a126d2f7f (patch)
tree1a4a99b5c877f0b69bd8756ea1518dd16f09dd2b /absl/time/internal
parenta00bdd176d66ef0b417d9576052a19091fbdf891 (diff)
Export of internal Abseil changes.
--
f4e870453d02106c2685e0461816469a4704ad25 by Abseil Team <absl-team@google.com>:

Expose TimeZone::NextTransition() and PrevTransition() now that
we have absl::CivilSecond support in time.h.  Note that these are
for informational purposes only.  General time code should not
care when offset changes occur.

PiperOrigin-RevId: 217177292

--
cfadd275c7333f7c27c4d682b9d167010d874e69 by Abseil Team <absl-team@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 217153577

--
6ff5b8c61a1239b9c0478a7c62bcd2844b310307 by Jon Cohen <cohenjon@google.com>:

Fix code examples in hash_testing.h.  Includes random clang-format changes.

PiperOrigin-RevId: 216898995

--
de124129d27f4627dabe193a10bf106a11783fba by Shaindel Schwartz <shaindel@google.com>:

Add contribution guidelines describing how we decide whether to include an API in Abseil.

PiperOrigin-RevId: 216886943
GitOrigin-RevId: f4e870453d02106c2685e0461816469a4704ad25
Change-Id: Ib9c6706f5bf931b71c0357bf1342053a3bee8ff7
Diffstat (limited to 'absl/time/internal')
-rw-r--r--absl/time/internal/cctz/src/time_zone_lookup_test.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/absl/time/internal/cctz/src/time_zone_lookup_test.cc b/absl/time/internal/cctz/src/time_zone_lookup_test.cc
index 280c96b4f207..f28e7f853b69 100644
--- a/absl/time/internal/cctz/src/time_zone_lookup_test.cc
+++ b/absl/time/internal/cctz/src/time_zone_lookup_test.cc
@@ -991,15 +991,17 @@ TEST(MakeTime, SysSecondsLimits) {
   tp = convert(civil_second::min(), west);
   EXPECT_EQ(time_point<absl::time_internal::cctz::seconds>::min(), tp);
 
-  // Checks that "tm_year + 1900", as used by the "libc" implementation,
-  // can produce year values beyond the range on an int without overflow.
+  if (sizeof(std::time_t) >= 8) {
+    // Checks that "tm_year + 1900", as used by the "libc" implementation,
+    // can produce year values beyond the range on an int without overflow.
 #if defined(_WIN32) || defined(_WIN64)
-  // localtime_s() and gmtime_s() don't believe in years past 3000.
+    // localtime_s() and gmtime_s() don't believe in years past 3000.
 #else
-  const time_zone libc_utc = LoadZone("libc:UTC");
-  tp = convert(civil_year(year_t{2147483648}), libc_utc);
-  EXPECT_EQ("2147483648-01-01T00:00:00+00:00", format(RFC3339, tp, libc_utc));
+    const time_zone libc_utc = LoadZone("libc:UTC");
+    tp = convert(civil_year(year_t{2147483648}), libc_utc);
+    EXPECT_EQ("2147483648-01-01T00:00:00+00:00", format(RFC3339, tp, libc_utc));
 #endif
+  }
 }
 
 TEST(NextTransition, UTC) {