]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Update expiry times for leap seconds lists
authorJonathan Wakely <jwakely@redhat.com>
Fri, 1 Mar 2024 20:55:10 +0000 (20:55 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 7 Mar 2024 20:55:25 +0000 (20:55 +0000)
The list in tzdb.cc isn't the only hardcoded list of leap seconds in the
library, there's the one defined inline in <chrono> (to avoid loading
the tzdb for the common case) and another in a testcase. This updates
them to note that there are no new leap seconds in 2024 either, until at
least 2024-12-28.

libstdc++-v3/ChangeLog:

* include/std/chrono (__get_leap_second_info): Update expiry
time for hardcoded list of leap seconds.
* testsuite/std/time/tzdb/leap_seconds.cc: Update comment.

libstdc++-v3/include/std/chrono
libstdc++-v3/testsuite/std/time/tzdb/leap_seconds.cc

index a59af34567c7f9c5b7a6145ed747d5c727fc500f..3a9751781d2b3d710b17d0a391c22849c98a3475 100644 (file)
@@ -3243,7 +3243,7 @@ namespace __detail
       };
       // The list above is known to be valid until (at least) this date
       // and only contains positive leap seconds.
-      const sys_seconds __expires(1703721600s); // 2023-12-28 00:00:00 UTC
+      const sys_seconds __expires(1735344000s); // 2024-12-28 00:00:00 UTC
 
 #if _GLIBCXX_USE_CXX11_ABI || ! _GLIBCXX_USE_DUAL_ABI
       if (__ss > __expires)
index f5401a24526319a74b9a90dc33d4d15f7e8b4a8d..5999635a89f0abe60d343d4df23ecb24f106ca01 100644 (file)
@@ -21,7 +21,7 @@ void
 test_load_leapseconds()
 {
   std::ofstream("leapseconds") << R"(
-# These are all the real leap seconds as of 2022:
+# These are all the real leap seconds as of 2024:
 Leap   1972    Jun     30      23:59:60        +       S
 Leap   1972    Dec     31      23:59:60        +       S
 Leap   1973    Dec     31      23:59:60        +       S