Skip to content

Commit d139743

Browse files
authored
Update zoneinfo files to 2024b (google#300)
1 parent 8bdbd84 commit d139743

39 files changed

+24
-38
lines changed

src/time_zone_lookup_test.cc

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,35 +1325,24 @@ TEST(TimeZoneEdgeCase, AmericaJamaica) {
13251325
ExpectTime(tp, tz, 1983, 12, 31, 23, 59, 59, -5 * 3600, false, "EST");
13261326
}
13271327

1328-
TEST(TimeZoneEdgeCase, WET) {
1329-
// Cover some non-existent times within forward transitions.
1330-
const time_zone tz = LoadZone("WET");
1331-
1332-
// Before the first transition.
1333-
auto tp = convert(civil_second(1977, 1, 1, 0, 0, 0), tz);
1334-
ExpectTime(tp, tz, 1977, 1, 1, 0, 0, 0, 0, false, "WET");
1335-
1336-
// Over the first transition.
1337-
// 228877199 == Sun, 3 Apr 1977 00:59:59 +0000 (WET)
1338-
// 228877200 == Sun, 3 Apr 1977 02:00:00 +0100 (WEST)
1339-
tp = convert(civil_second(1977, 4, 3, 0, 59, 59), tz);
1340-
ExpectTime(tp, tz, 1977, 4, 3, 0, 59, 59, 0, false, "WET");
1328+
TEST(TimeZoneEdgeCase, EuropeLisbon) {
1329+
// Cover a non-existent time within a forward transition.
1330+
const time_zone tz = LoadZone("Europe/Lisbon");
1331+
1332+
// Over a forward transition.
1333+
// 354671999 == Sat, 28 Mar 1981 23:59:59 +0000 (WET)
1334+
// 354672000 == Sun, 29 Mar 1981 01:00:00 +0100 (WEST)
1335+
auto tp = convert(civil_second(1981, 3, 28, 23, 59, 59), tz);
1336+
ExpectTime(tp, tz, 1981, 3, 28, 23, 59, 59, 0, false, "WET");
13411337
tp += cctz::seconds(1);
1342-
ExpectTime(tp, tz, 1977, 4, 3, 2, 0, 0, 1 * 3600, true, "WEST");
1338+
ExpectTime(tp, tz, 1981, 3, 29, 1, 0, 0, 1 * 3600, true, "WEST");
13431339

1344-
// A non-existent time within the first transition.
1345-
time_zone::civil_lookup cl1 = tz.lookup(civil_second(1977, 4, 3, 1, 15, 0));
1340+
// A non-existent time within the transition.
1341+
time_zone::civil_lookup cl1 = tz.lookup(civil_second(1981, 3, 29, 0, 15, 0));
13461342
EXPECT_EQ(time_zone::civil_lookup::SKIPPED, cl1.kind);
1347-
ExpectTime(cl1.pre, tz, 1977, 4, 3, 2, 15, 0, 1 * 3600, true, "WEST");
1348-
ExpectTime(cl1.trans, tz, 1977, 4, 3, 2, 0, 0, 1 * 3600, true, "WEST");
1349-
ExpectTime(cl1.post, tz, 1977, 4, 3, 0, 15, 0, 0 * 3600, false, "WET");
1350-
1351-
// A non-existent time within the second forward transition.
1352-
time_zone::civil_lookup cl2 = tz.lookup(civil_second(1978, 4, 2, 1, 15, 0));
1353-
EXPECT_EQ(time_zone::civil_lookup::SKIPPED, cl2.kind);
1354-
ExpectTime(cl2.pre, tz, 1978, 4, 2, 2, 15, 0, 1 * 3600, true, "WEST");
1355-
ExpectTime(cl2.trans, tz, 1978, 4, 2, 2, 0, 0, 1 * 3600, true, "WEST");
1356-
ExpectTime(cl2.post, tz, 1978, 4, 2, 0, 15, 0, 0 * 3600, false, "WET");
1343+
ExpectTime(cl1.pre, tz, 1981, 3, 29, 1, 15, 0, 1 * 3600, true, "WEST");
1344+
ExpectTime(cl1.trans, tz, 1981, 3, 29, 1, 0, 0, 1 * 3600, true, "WEST");
1345+
ExpectTime(cl1.post, tz, 1981, 3, 28, 23, 15, 0, 0 * 3600, false, "WET");
13571346
}
13581347

13591348
TEST(TimeZoneEdgeCase, FixedOffsets) {

src/tzfile.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,16 @@ struct tzhead {
7676
** If tzh_version is '2' or greater, the above is followed by a second instance
7777
** of tzhead and a second instance of the data in which each coded transition
7878
** time uses 8 rather than 4 chars,
79-
** then a POSIX-TZ-environment-variable-style string for use in handling
79+
** then a POSIX.1-2017 proleptic TZ string for use in handling
8080
** instants after the last transition time stored in the file
8181
** (with nothing between the newlines if there is no POSIX.1-2017
8282
** representation for such instants).
8383
**
84-
** If tz_version is '3' or greater, the above is extended as follows.
84+
** If tz_version is '3' or greater, the TZ string can be any POSIX.1-2024
85+
** proleptic TZ string, which means the above is extended as follows.
8586
** First, the TZ string's hour offset may range from -167
86-
** through 167 as compared to the POSIX-required 0 through 24.
87+
** through 167 as compared to the range 0 through 24 required
88+
** by POSIX.1-2017 and earlier.
8789
** Second, its DST start time may be January 1 at 00:00 and its stop
8890
** time December 31 at 24:00 plus the difference between DST and
8991
** standard time, indicating DST all year.

testdata/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024a
1+
2024b

testdata/zoneinfo/Africa/Maputo

0 Bytes
Binary file not shown.
-28 Bytes
Binary file not shown.

testdata/zoneinfo/America/Cancun

9 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

testdata/zoneinfo/America/Ensenada

54 Bytes
Binary file not shown.
-28 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)