[committed] libstdc++: Update tzdata to 2023a [PR109288]

Message ID 20230328201450.1201780-1-jwakely@redhat.com
State Committed
Commit cf19ef9eca82b01dd0a3a0a8e4c8bcec236eb2d9
Headers
Series [committed] libstdc++: Update tzdata to 2023a [PR109288] |

Commit Message

Jonathan Wakely March 28, 2023, 8:14 p.m. UTC
  Tested powerpc64le-linux. Pushed to trunk.

-- >8 --

Import the new 2023a tzdata.zi file and update the expiry dates of the
hardcoded lists of leapseconds to 2023-12-28.

With the new data, Africa/Egypt no longer has a single unbroken sys_info
from 2014-09-25 to chrono::year::max(). Only check up to 2014-09-01 so
that the test isn't sensitive to differences between 2022g and 2023a
data.

libstdc++-v3/ChangeLog:

	PR libstdc++/109288
	* include/std/chrono (__detail::__get_leap_second_info): Update
	expiry date of hardcoded leapseconds list.
	* src/c++20/tzdb.cc (tzdb_list::_Node::_S_read_leap_seconds()):
	Likewise.
	* src/c++20/tzdata.zi: Import new file from 2023a release.
	* testsuite/std/time/time_zone/get_info_local.cc: Only check
	transitions for Egypt up to 2014.
---
 libstdc++-v3/include/std/chrono               |   2 +-
 libstdc++-v3/src/c++20/tzdata.zi              | 136 ++++++++++++++----
 libstdc++-v3/src/c++20/tzdb.cc                |   4 +-
 .../std/time/time_zone/get_info_local.cc      |   4 +-
 4 files changed, 112 insertions(+), 34 deletions(-)
  

Patch

diff --git a/libstdc++-v3/include/std/chrono b/libstdc++-v3/include/std/chrono
index f2b8b02fd8a..7bfc9b79acf 100644
--- a/libstdc++-v3/include/std/chrono
+++ b/libstdc++-v3/include/std/chrono
@@ -3213,7 +3213,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(1687910400s); // 2023-06-28 00:00:00 UTC
+      const sys_seconds __expires(1703721600s); // 2023-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/tzdata.zi b/libstdc++-v3/src/c++20/tzdata.zi
index 3db1460e1be..5f65edcd5cf 100644
--- a/libstdc++-v3/src/c++20/tzdata.zi
+++ b/libstdc++-v3/src/c++20/tzdata.zi
@@ -1,4 +1,4 @@ 
-# version 2022g
+# version 2023b
 # This zic input file is in the public domain.
 R d 1916 o - Jun 14 23s 1 S
 R d 1916 1919 - O Su>=1 23s 0 -
@@ -75,6 +75,8 @@  R K 2014 o - May 15 24 1 S
 R K 2014 o - Jun 26 24 0 -
 R K 2014 o - Jul 31 24 1 S
 R K 2014 o - S lastTh 24 0 -
+R K 2023 ma - Ap lastF 0 1 S
+R K 2023 ma - O lastTh 24 0 -
 Z Africa/Cairo 2:5:9 - LMT 1900 O
 2 K EE%sT
 Z Africa/Bissau -1:2:20 - LMT 1912 Ja 1 1u
@@ -172,7 +174,7 @@  R M 2021 o - May 16 2 0 -
 R M 2022 o - Mar 27 3 -1 -
 R M 2022 o - May 8 2 0 -
 R M 2023 o - Mar 19 3 -1 -
-R M 2023 o - Ap 30 2 0 -
+R M 2023 o - Ap 23 2 0 -
 R M 2024 o - Mar 10 3 -1 -
 R M 2024 o - Ap 14 2 0 -
 R M 2025 o - F 23 3 -1 -
@@ -188,7 +190,7 @@  R M 2029 o - F 18 2 0 -
 R M 2029 o - D 30 3 -1 -
 R M 2030 o - F 10 2 0 -
 R M 2030 o - D 22 3 -1 -
-R M 2031 o - F 2 2 0 -
+R M 2031 o - Ja 26 2 0 -
 R M 2031 o - D 14 3 -1 -
 R M 2032 o - Ja 18 2 0 -
 R M 2032 o - N 28 3 -1 -
@@ -204,7 +206,7 @@  R M 2036 o - N 23 2 0 -
 R M 2037 o - O 4 3 -1 -
 R M 2037 o - N 15 2 0 -
 R M 2038 o - S 26 3 -1 -
-R M 2038 o - N 7 2 0 -
+R M 2038 o - O 31 2 0 -
 R M 2039 o - S 18 3 -1 -
 R M 2039 o - O 23 2 0 -
 R M 2040 o - S 2 3 -1 -
@@ -220,7 +222,7 @@  R M 2044 o - Au 28 2 0 -
 R M 2045 o - Jul 9 3 -1 -
 R M 2045 o - Au 20 2 0 -
 R M 2046 o - Jul 1 3 -1 -
-R M 2046 o - Au 12 2 0 -
+R M 2046 o - Au 5 2 0 -
 R M 2047 o - Jun 23 3 -1 -
 R M 2047 o - Jul 28 2 0 -
 R M 2048 o - Jun 7 3 -1 -
@@ -236,7 +238,7 @@  R M 2052 o - Jun 2 2 0 -
 R M 2053 o - Ap 13 3 -1 -
 R M 2053 o - May 25 2 0 -
 R M 2054 o - Ap 5 3 -1 -
-R M 2054 o - May 17 2 0 -
+R M 2054 o - May 10 2 0 -
 R M 2055 o - Mar 28 3 -1 -
 R M 2055 o - May 2 2 0 -
 R M 2056 o - Mar 12 3 -1 -
@@ -252,7 +254,7 @@  R M 2060 o - Mar 7 2 0 -
 R M 2061 o - Ja 16 3 -1 -
 R M 2061 o - F 27 2 0 -
 R M 2062 o - Ja 8 3 -1 -
-R M 2062 o - F 19 2 0 -
+R M 2062 o - F 12 2 0 -
 R M 2062 o - D 31 3 -1 -
 R M 2063 o - F 4 2 0 -
 R M 2063 o - D 16 3 -1 -
@@ -268,7 +270,7 @@  R M 2067 o - D 11 2 0 -
 R M 2068 o - O 21 3 -1 -
 R M 2068 o - D 2 2 0 -
 R M 2069 o - O 13 3 -1 -
-R M 2069 o - N 24 2 0 -
+R M 2069 o - N 17 2 0 -
 R M 2070 o - O 5 3 -1 -
 R M 2070 o - N 9 2 0 -
 R M 2071 o - S 20 3 -1 -
@@ -284,7 +286,7 @@  R M 2075 o - S 15 2 0 -
 R M 2076 o - Jul 26 3 -1 -
 R M 2076 o - S 6 2 0 -
 R M 2077 o - Jul 18 3 -1 -
-R M 2077 o - Au 29 2 0 -
+R M 2077 o - Au 22 2 0 -
 R M 2078 o - Jul 10 3 -1 -
 R M 2078 o - Au 14 2 0 -
 R M 2079 o - Jun 25 3 -1 -
@@ -294,13 +296,13 @@  R M 2080 o - Jul 21 2 0 -
 R M 2081 o - Jun 1 3 -1 -
 R M 2081 o - Jul 13 2 0 -
 R M 2082 o - May 24 3 -1 -
-R M 2082 o - Jul 5 2 0 -
+R M 2082 o - Jun 28 2 0 -
 R M 2083 o - May 16 3 -1 -
 R M 2083 o - Jun 20 2 0 -
 R M 2084 o - Ap 30 3 -1 -
 R M 2084 o - Jun 11 2 0 -
 R M 2085 o - Ap 22 3 -1 -
-R M 2085 o - Jun 3 2 0 -
+R M 2085 o - May 27 2 0 -
 R M 2086 o - Ap 14 3 -1 -
 R M 2086 o - May 19 2 0 -
 R M 2087 o - Mar 30 3 -1 -
@@ -918,9 +920,11 @@  R l 1988 o - Jun 1 0 1 S
 R l 1989 o - May 10 0 1 S
 R l 1990 1992 - May 1 0 1 S
 R l 1992 o - O 4 0 0 -
-R l 1993 ma - Mar lastSu 0 1 S
+R l 1993 2022 - Mar lastSu 0 1 S
 R l 1993 1998 - S lastSu 0 0 -
 R l 1999 ma - O lastSu 0 0 -
+R l 2023 o - Ap 21 0 1 S
+R l 2024 ma - Mar lastSu 0 1 S
 Z Asia/Beirut 2:22 - LMT 1880
 2 l EE%sT
 R NB 1935 1941 - S 14 0 0:20 -
@@ -997,8 +1001,86 @@  R P 2020 2021 - Mar Sa<=30 0 1 S
 R P 2020 o - O 24 1 0 -
 R P 2021 o - O 29 1 0 -
 R P 2022 o - Mar 27 0 1 S
-R P 2022 ma - O Sa<=30 2 0 -
-R P 2023 ma - Mar Sa<=30 2 1 S
+R P 2022 2035 - O Sa<=30 2 0 -
+R P 2023 o - Ap 29 2 1 S
+R P 2024 o - Ap 13 2 1 S
+R P 2025 o - Ap 5 2 1 S
+R P 2026 2054 - Mar Sa<=30 2 1 S
+R P 2036 o - O 18 2 0 -
+R P 2037 o - O 10 2 0 -
+R P 2038 o - S 25 2 0 -
+R P 2039 o - S 17 2 0 -
+R P 2039 o - O 22 2 1 S
+R P 2039 2067 - O Sa<=30 2 0 -
+R P 2040 o - S 1 2 0 -
+R P 2040 o - O 13 2 1 S
+R P 2041 o - Au 24 2 0 -
+R P 2041 o - S 28 2 1 S
+R P 2042 o - Au 16 2 0 -
+R P 2042 o - S 20 2 1 S
+R P 2043 o - Au 1 2 0 -
+R P 2043 o - S 12 2 1 S
+R P 2044 o - Jul 23 2 0 -
+R P 2044 o - Au 27 2 1 S
+R P 2045 o - Jul 15 2 0 -
+R P 2045 o - Au 19 2 1 S
+R P 2046 o - Jun 30 2 0 -
+R P 2046 o - Au 11 2 1 S
+R P 2047 o - Jun 22 2 0 -
+R P 2047 o - Jul 27 2 1 S
+R P 2048 o - Jun 6 2 0 -
+R P 2048 o - Jul 18 2 1 S
+R P 2049 o - May 29 2 0 -
+R P 2049 o - Jul 3 2 1 S
+R P 2050 o - May 21 2 0 -
+R P 2050 o - Jun 25 2 1 S
+R P 2051 o - May 6 2 0 -
+R P 2051 o - Jun 17 2 1 S
+R P 2052 o - Ap 27 2 0 -
+R P 2052 o - Jun 1 2 1 S
+R P 2053 o - Ap 12 2 0 -
+R P 2053 o - May 24 2 1 S
+R P 2054 o - Ap 4 2 0 -
+R P 2054 o - May 16 2 1 S
+R P 2055 o - May 1 2 1 S
+R P 2056 o - Ap 22 2 1 S
+R P 2057 o - Ap 7 2 1 S
+R P 2058 ma - Mar Sa<=30 2 1 S
+R P 2068 o - O 20 2 0 -
+R P 2069 o - O 12 2 0 -
+R P 2070 o - O 4 2 0 -
+R P 2071 o - S 19 2 0 -
+R P 2072 o - S 10 2 0 -
+R P 2072 o - O 15 2 1 S
+R P 2073 o - S 2 2 0 -
+R P 2073 o - O 7 2 1 S
+R P 2074 o - Au 18 2 0 -
+R P 2074 o - S 29 2 1 S
+R P 2075 o - Au 10 2 0 -
+R P 2075 o - S 14 2 1 S
+R P 2075 ma - O Sa<=30 2 0 -
+R P 2076 o - Jul 25 2 0 -
+R P 2076 o - S 5 2 1 S
+R P 2077 o - Jul 17 2 0 -
+R P 2077 o - Au 28 2 1 S
+R P 2078 o - Jul 9 2 0 -
+R P 2078 o - Au 13 2 1 S
+R P 2079 o - Jun 24 2 0 -
+R P 2079 o - Au 5 2 1 S
+R P 2080 o - Jun 15 2 0 -
+R P 2080 o - Jul 20 2 1 S
+R P 2081 o - Jun 7 2 0 -
+R P 2081 o - Jul 12 2 1 S
+R P 2082 o - May 23 2 0 -
+R P 2082 o - Jul 4 2 1 S
+R P 2083 o - May 15 2 0 -
+R P 2083 o - Jun 19 2 1 S
+R P 2084 o - Ap 29 2 0 -
+R P 2084 o - Jun 10 2 1 S
+R P 2085 o - Ap 21 2 0 -
+R P 2085 o - Jun 2 2 1 S
+R P 2086 o - Ap 13 2 0 -
+R P 2086 o - May 18 2 1 S
 Z Asia/Gaza 2:17:52 - LMT 1900 O
 2 Z EET/EEST 1948 May 15
 2 K EE%sT 1967 Jun 5
@@ -1754,8 +1836,8 @@  Z America/Scoresbysund -1:27:52 - LMT 1916 Jul 28
 -1 E -01/+00
 Z America/Nuuk -3:26:56 - LMT 1916 Jul 28
 -3 - -03 1980 Ap 6 2
--3 E -03/-02 2023 Mar 25 22
--2 - -02
+-3 E -03/-02 2023 O 29 1u
+-2 E -02/-01
 Z America/Thule -4:35:8 - LMT 1916 Jul 28
 -4 Th A%sT
 Z Europe/Tallinn 1:39 - LMT 1880
@@ -2175,13 +2257,13 @@  Z Europe/Volgograd 2:57:40 - LMT 1920 Ja 3
 3 - +03 1930 Jun 21
 4 - +04 1961 N 11
 4 R +04/+05 1988 Mar 27 2s
-3 R +03/+04 1991 Mar 31 2s
+3 R MSK/MSD 1991 Mar 31 2s
 4 - +04 1992 Mar 29 2s
-3 R +03/+04 2011 Mar 27 2s
-4 - +04 2014 O 26 2s
-3 - +03 2018 O 28 2s
+3 R MSK/MSD 2011 Mar 27 2s
+4 - MSK 2014 O 26 2s
+3 - MSK 2018 O 28 2s
 4 - +04 2020 D 27 2s
-3 - +03
+3 - MSK
 Z Europe/Saratov 3:4:18 - LMT 1919 Jul 1 0u
 3 - +03 1930 Jun 21
 4 R +04/+05 1988 Mar 27 2s
@@ -2194,11 +2276,11 @@  Z Europe/Saratov 3:4:18 - LMT 1919 Jul 1 0u
 Z Europe/Kirov 3:18:48 - LMT 1919 Jul 1 0u
 3 - +03 1930 Jun 21
 4 R +04/+05 1989 Mar 26 2s
-3 R +03/+04 1991 Mar 31 2s
+3 R MSK/MSD 1991 Mar 31 2s
 4 - +04 1992 Mar 29 2s
-3 R +03/+04 2011 Mar 27 2s
-4 - +04 2014 O 26 2s
-3 - +03
+3 R MSK/MSD 2011 Mar 27 2s
+4 - MSK 2014 O 26 2s
+3 - MSK
 Z Europe/Samara 3:20:20 - LMT 1919 Jul 1 0u
 3 - +03 1930 Jun 21
 4 - +04 1935 Ja 27
@@ -3070,9 +3152,6 @@  Z America/Cambridge_Bay 0 - -00 1920
 -5 - EST 2000 N 5
 -6 - CST 2001 Ap 1 3
 -7 C M%sT
-Z America/Yellowknife 0 - -00 1935
--7 Y M%sT 1980
--7 C M%sT
 Z America/Inuvik 0 - -00 1953
 -8 Y P%sT 1979 Ap lastSu 2
 -7 Y M%sT 1980
@@ -4171,6 +4250,7 @@  L America/Argentina/Cordoba America/Rosario
 L America/Tijuana America/Santa_Isabel
 L America/Denver America/Shiprock
 L America/Toronto America/Thunder_Bay
+L America/Edmonton America/Yellowknife
 L Pacific/Auckland Antarctica/South_Pole
 L Asia/Shanghai Asia/Chongqing
 L Asia/Shanghai Asia/Harbin
diff --git a/libstdc++-v3/src/c++20/tzdb.cc b/libstdc++-v3/src/c++20/tzdb.cc
index 2b68888e3b9..a43b4f33eba 100644
--- a/libstdc++-v3/src/c++20/tzdb.cc
+++ b/libstdc++-v3/src/c++20/tzdb.cc
@@ -1132,8 +1132,8 @@  namespace std::chrono
   pair<vector<leap_second>, bool>
   tzdb_list::_Node::_S_read_leap_seconds()
   {
-    // This list is valid until at least 2023-06-28 00:00:00 UTC.
-    auto expires = sys_days{2023y/6/28};
+    // This list is valid until at least 2023-12-28 00:00:00 UTC.
+    auto expires = sys_days{2023y/12/28};
     vector<leap_second> leaps
     {
       (leap_second)  78796800, // 1 Jul 1972
diff --git a/libstdc++-v3/testsuite/std/time/time_zone/get_info_local.cc b/libstdc++-v3/testsuite/std/time/time_zone/get_info_local.cc
index 46ca34b71fd..e5e342dcff9 100644
--- a/libstdc++-v3/testsuite/std/time/time_zone/get_info_local.cc
+++ b/libstdc++-v3/testsuite/std/time/time_zone/get_info_local.cc
@@ -150,7 +150,7 @@  test_egypt()
 
   std::ostringstream out;
   local_seconds lt(local_days(2001y/January/1));
-  const local_days end(2021y/January/1);
+  const local_days end(2014y/September/1);
 
   while (lt < end)
   {
@@ -204,8 +204,6 @@  test_egypt()
 [ambiguous local time between [2014-05-15 22:00:00,2014-06-26 21:00:00,03:00:00,60min,EEST] and [2014-06-26 21:00:00,2014-07-31 22:00:00,02:00:00,0min,EET]]
 [[2014-06-26 21:00:00,2014-07-31 22:00:00,02:00:00,0min,EET]]
 [[2014-07-31 22:00:00,2014-09-25 21:00:00,03:00:00,60min,EEST]]
-[ambiguous local time between [2014-07-31 22:00:00,2014-09-25 21:00:00,03:00:00,60min,EEST] and [2014-09-25 21:00:00,32767-12-31 00:00:00,02:00:00,0min,EET]]
-[[2014-09-25 21:00:00,32767-12-31 00:00:00,02:00:00,0min,EET]]
 )";
   VERIFY( out.str() == expected );
 }