[gcc r16-8822] libstdc++: Update leap seconds expiry to 2026a value

Jonathan Wakely redi@gcc.gnu.org
Wed Apr 29 14:11:46 GMT 2026


https://gcc.gnu.org/g:4142043bb8e13e830d06860448842ea63df4ce8b

commit r16-8822-g4142043bb8e13e830d06860448842ea63df4ce8b
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Jan 12 16:57:41 2024 +0000

    libstdc++: Update leap seconds expiry to 2026a value
    
    Set the new leap seconds expiry date from the 2026a tzdata release.
    
    This is a partial backport of r17-57-gb8fd759dc61c0a taking only the
    updated leapseconds expiry date, not the tzdata.zi changes. Most users
    get tzdata.zi from /usr/share/zoneinfo/tzdata.zi supplied by the OS, so
    the embedded copy isn't needed. The leap second expiry is hardcoded
    though so updating the value avoids calling into the shared library for
    dates after 2026-06-28 (and before the new expiry, 2026-12-28).
    
    libstdc++-v3/ChangeLog:
    
            * include/std/chrono (chrono::__detail::__get_leap_second_info):
            Update expiry date for leap seconds list.
            * src/c++20/tzdb.cc (tzdb_list::_Node::_S_read_leap_seconds):
            Likewise.

Diff:
---
 libstdc++-v3/include/std/chrono | 2 +-
 libstdc++-v3/src/c++20/tzdb.cc  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libstdc++-v3/include/std/chrono b/libstdc++-v3/include/std/chrono
index 7c887f56cc23..674f867dcdc7 100644
--- a/libstdc++-v3/include/std/chrono
+++ b/libstdc++-v3/include/std/chrono
@@ -3254,7 +3254,7 @@ namespace __detail
       };
       // The list above is known to be valid until (at least) this date
       // and only contains positive leap seconds.
-      constexpr sys_seconds __expires(1782604800s); // 2026-06-28 00:00:00 UTC
+      constexpr sys_seconds __expires(1798416000s); // 2026-12-28 00:00:00 UTC
 
 #if _GLIBCXX_USE_CXX11_ABI || ! _GLIBCXX_USE_DUAL_ABI
       if (__ss > __expires)
diff --git a/libstdc++-v3/src/c++20/tzdb.cc b/libstdc++-v3/src/c++20/tzdb.cc
index eb6ac7d07c72..b0fbfc46a6d3 100644
--- a/libstdc++-v3/src/c++20/tzdb.cc
+++ b/libstdc++-v3/src/c++20/tzdb.cc
@@ -1256,8 +1256,8 @@ namespace std::chrono
   pair<vector<leap_second>, bool>
   tzdb_list::_Node::_S_read_leap_seconds()
   {
-    // This list is valid until at least 2026-06-28 00:00:00 UTC.
-    constexpr auto expires = sys_days{2026y/06/28};
+    // This list is valid until at least 2026-12-28 00:00:00 UTC.
+    constexpr auto expires = sys_days{2026y/12/28};
     vector<leap_second> leaps
     {
       (leap_second)  78796800, // 1 Jul 1972


More information about the Libstdc++-cvs mailing list