Skip to content

Commit

Permalink
contrib/tzdata: import tzdata 2024b
Browse files Browse the repository at this point in the history
  • Loading branch information
ppaeps committed Sep 9, 2024
1 parent b07e847 commit 59ffae6
Show file tree
Hide file tree
Showing 22 changed files with 1,768 additions and 1,241 deletions.
18 changes: 11 additions & 7 deletions contrib/tzdata/CONTRIBUTING
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ such as renaming, adding or removing zones, please read
"Theory and pragmatics of the tz code and data"
<https://www.iana.org/time-zones/repository/theory.html>.
It is also good to browse the mailing list archives
<https://mm.icann.org/pipermail/tz/> for examples of patches that tend
to work well. Additions to data should contain commentary citing
reliable sources as justification. Citations should use "https:" URLs
if available.
<https://lists.iana.org/hyperkitty/list/[email protected]/>
for examples of patches that tend to work well.
Changes should contain commentary citing reliable sources.
Citations should use "https:" URLs if available.

For changes that fix sensitive security-related bugs, please see the
distribution's 'SECURITY' file.
Expand Down Expand Up @@ -63,12 +63,16 @@ If you use Git the following workflow may be helpful:
* Edit source files. Include commentary that justifies the
changes by citing reliable sources.

* Debug the changes, e.g.:
* Debug the changes locally, e.g.:

make check
make install
make TOPDIR=$PWD/tz clean check install
./zdump -v America/Los_Angeles

Although builds assume only basic POSIX, they use extra features
if available. 'make check' accesses validator.w3.org unless you
lack 'curl' or use 'make CURL=:'. If you have the latest GCC,
"make CFLAGS='$(GCC_DEBUG_FLAGS)'" does extra checking.

* For each separable change, commit it in the new branch, e.g.:

git add northamerica
Expand Down
412 changes: 216 additions & 196 deletions contrib/tzdata/Makefile

Large diffs are not rendered by default.

124 changes: 122 additions & 2 deletions contrib/tzdata/NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,125 @@
News for the tz database

Release 2024b - 2024-09-04 12:27:47 -0700

Briefly:
Improve historical data for Mexico, Mongolia, and Portugal.
System V names are now obsolescent.
The main data form now uses %z.
The code now conforms to RFC 8536 for early timestamps.
Support POSIX.1-2024, which removes asctime_r and ctime_r.
Assume POSIX.2-1992 or later for shell scripts.
SUPPORT_C89 now defaults to 1.

Changes to past timestamps

Asia/Choibalsan is now an alias for Asia/Ulaanbaatar rather than
being a separate Zone with differing behavior before April 2008.
This seems better given our wildly conflicting information about
Mongolia's time zone history. (Thanks to Heitor David Pinto.)

Historical transitions for Mexico have been updated based on
official Mexican decrees. The affected timestamps occur during
the years 1921-1927, 1931, 1945, 1949-1970, and 1981-1997.
The affected zones are America/Bahia_Banderas, America/Cancun,
America/Chihuahua, America/Ciudad_Juarez, America/Hermosillo,
America/Mazatlan, America/Merida, America/Mexico_City,
America/Monterrey, America/Ojinaga, and America/Tijuana.
(Thanks to Heitor David Pinto.)

Historical transitions for Portugal, represented by Europe/Lisbon,
Atlantic/Azores, and Atlantic/Madeira, have been updated based on a
close reading of old Portuguese legislation, replacing previous data
mainly originating from Whitman and Shanks & Pottenger. These
changes affect a few transitions in 1917-1921, 1924, and 1940
throughout these regions by a few hours or days, and various
timestamps between 1977 and 1993 depending on the region. In
particular, the Azores and Madeira did not observe DST from 1977 to
1981. Additionally, the adoption of standard zonal time in former
Portuguese colonies have been adjusted: Africa/Maputo in 1909, and
Asia/Dili by 22 minutes at the start of 1912.
(Thanks to Tim Parenti.)

Changes to past tm_isdst flags

The period from 1966-04-03 through 1966-10-02 in Portugal is now
modeled as DST, to more closely reflect how contemporaneous changes
in law entered into force.

Changes to data

Names present only for compatibility with UNIX System V
(last released in the 1990s) have been moved to 'backward'.
These names, which for post-1970 timestamps mostly just duplicate
data of geographical names, were confusing downstream uses.
Names moved to 'backward' are now links to geographical names.
This affects behavior for TZ='EET' for some pre-1981 timestamps,
for TZ='CET' for some pre-1947 timestamps, and for TZ='WET' for
some pre-1996 timestamps. Also, TZ='MET' now behaves like
TZ='CET' and so uses the abbreviation "CET" rather than "MET".
Those needing the previous TZDB behavior, which does not match any
real-world clocks, can find the old entries in 'backzone'.
(Problem reported by Justin Grant.)

The main source files' time zone abbreviations now use %z,
supported by zic since release 2015f and used in vanguard form
since release 2022b. For example, America/Sao_Paulo now contains
the zone continuation line "-3:00 Brazil %z", which is less error
prone than the old "-3:00 Brazil -03/-02". This does not change
the represented data: the generated TZif files are unchanged.
Rearguard form still avoids %z, to support obsolescent parsers.

Asia/Almaty has been removed from zonenow.tab as it now agrees
with Asia/Tashkent for future timestamps, due to Kazakhstan's
2024-02-29 time zone change. Similarly, America/Scoresbysund
has been removed, as it now agrees with America/Nuuk due to
its 2024-03-31 time zone change.

Changes to code

localtime.c now always uses a TZif file's time type 0 to handle
timestamps before the file's first transition. Formerly,
localtime.c sometimes inferred a different time type, in order to
handle problematic data generated by zic 2018e or earlier. As it
is now safe to assume more recent versions of zic, there is no
longer a pressing need to fail to conform RFC 8536 section 3.2,
which requires using time type 0 in this situation. This change
does not affect behavior when reading TZif files generated by zic
2018f and later.

POSIX.1-2024 removes asctime_r and ctime_r and does not let
libraries define them, so remove them except when needed to
conform to earlier POSIX. These functions are dangerous as they
can overrun user buffers. If you still need them, add
-DSUPPORT_POSIX2008 to CFLAGS.

The SUPPORT_C89 option now defaults to 1 instead of 0, fixing a
POSIX-conformance bug introduced in 2023a.

tzselect now supports POSIX.1-2024 proleptic TZ strings. Also, it
assumes POSIX.2-1992 or later, as practical porting targets now
all support that, and it uses some features from POSIX.1-2024 if
available.

Changes to build procedure

'make check' no longer requires curl and Internet access.

The build procedure now assumes POSIX.2-1992 or later, to simplify
maintenance. To build on Solaris 10, the only extant system still
defaulting to pre-POSIX, prepend /usr/xpg4/bin to PATH.

Changes to documentation

The documentation now reflects POSIX.1-2024.

Changes to commentary

Commentary about historical transitions in Portugal and her former
colonies has been expanded with links to many relevant legislation.
(Thanks to Tim Parenti.)


Release 2024a - 2024-02-01 09:28:56 -0800

Briefly:
Expand Down Expand Up @@ -161,7 +281,7 @@ Release 2023d - 2023-12-21 20:02:24 -0800
* It uses the special .POSIX target.
* It quotes special characters more carefully.
* It no longer mishandles builds in an ISO 8859 locale.
Due to the CC changes, TZDIR is now #defined in a file tzfile.h
Due to the CC changes, TZDIR is now #defined in a file tzdir.h
built by 'make', not in a $(CC) -D option. Also, TZDEFAULT is
now treated like TZDIR as they have similar roles.

Expand Down Expand Up @@ -283,7 +403,7 @@ Release 2023a - 2023-03-22 12:39:33 -0700
To improve tzselect diagnostics, zone1970.tab's comments column is
now limited to countries that have multiple timezones.

Note that leap seconds are planned to be discontinued by 2035.
Note that there are plans to discontinue leap seconds by 2035.


Release 2022g - 2022-11-29 08:58:31 -0800
Expand Down
73 changes: 42 additions & 31 deletions contrib/tzdata/africa
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,16 @@ Zone Africa/Algiers 0:12:12 - LMT 1891 Mar 16

# Cape Verde / Cabo Verde
#
# From Paul Eggert (2018-02-16):
# Shanks gives 1907 for the transition to +02.
# For now, ignore that and follow the 1911-05-26 Portuguese decree
# (see Europe/Lisbon).
# From Tim Parenti (2024-07-01), per Paul Eggert (2018-02-16):
# For timestamps before independence, see commentary for Europe/Lisbon.
# Shanks gives 1907 instead for the transition to -02.
#
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Atlantic/Cape_Verde -1:34:04 - LMT 1912 Jan 01 2:00u # Praia
-2:00 - -02 1942 Sep
-2:00 1:00 -01 1945 Oct 15
-2:00 - -02 1975 Nov 25 2:00
-1:00 - -01
-2:00 - %z 1942 Sep
-2:00 1:00 %z 1945 Oct 15
-2:00 - %z 1975 Nov 25 2:00
-1:00 - %z

# Chad
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Expand Down Expand Up @@ -345,14 +344,12 @@ Zone Africa/Cairo 2:05:09 - LMT 1900 Oct

# Guinea-Bissau
#
# From Paul Eggert (2018-02-16):
# Shanks gives 1911-05-26 for the transition to WAT,
# evidently confusing the date of the Portuguese decree
# (see Europe/Lisbon) with the date that it took effect.
# From Tim Parenti (2024-07-01), per Paul Eggert (2018-02-16):
# For timestamps before independence, see commentary for Europe/Lisbon.
#
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Africa/Bissau -1:02:20 - LMT 1912 Jan 1 1:00u
-1:00 - -01 1975
-1:00 - %z 1975
0:00 - GMT

# Comoros
Expand Down Expand Up @@ -417,10 +414,10 @@ Zone Africa/Bissau -1:02:20 - LMT 1912 Jan 1 1:00u

# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Africa/Nairobi 2:27:16 - LMT 1908 May
2:30 - +0230 1928 Jun 30 24:00
2:30 - %z 1928 Jun 30 24:00
3:00 - EAT 1930 Jan 4 24:00
2:30 - +0230 1936 Dec 31 24:00
2:45 - +0245 1942 Jul 31 24:00
2:30 - %z 1936 Dec 31 24:00
2:45 - %z 1942 Jul 31 24:00
3:00 - EAT

# Liberia
Expand Down Expand Up @@ -591,7 +588,7 @@ Rule Mauritius 2008 only - Oct lastSun 2:00 1:00 -
Rule Mauritius 2009 only - Mar lastSun 2:00 0 -
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis
4:00 Mauritius +04/+05
4:00 Mauritius %z
# Agalega Is, Rodriguez
# no information; probably like Indian/Mauritius

Expand Down Expand Up @@ -1071,10 +1068,10 @@ Rule Morocco 2087 only - May 11 2:00 0 -

# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26
0:00 Morocco +00/+01 1984 Mar 16
1:00 - +01 1986
0:00 Morocco +00/+01 2018 Oct 28 3:00
1:00 Morocco +01/+00
0:00 Morocco %z 1984 Mar 16
1:00 - %z 1986
0:00 Morocco %z 2018 Oct 28 3:00
1:00 Morocco %z

# Western Sahara
#
Expand All @@ -1088,9 +1085,9 @@ Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26
# since most of it was then controlled by Morocco.

Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan # El Aaiún
-1:00 - -01 1976 Apr 14
0:00 Morocco +00/+01 2018 Oct 28 3:00
1:00 Morocco +01/+00
-1:00 - %z 1976 Apr 14
0:00 Morocco %z 2018 Oct 28 3:00
1:00 Morocco %z

# Botswana
# Burundi
Expand All @@ -1101,13 +1098,27 @@ Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan # El Aaiún
# Zambia
# Zimbabwe
#
# Shanks gives 1903-03-01 for the transition to CAT.
# Perhaps the 1911-05-26 Portuguese decree
# https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf
# merely made it official?
# From Tim Parenti (2024-07-01):
# For timestamps before Mozambique's independence, see commentary for
# Europe/Lisbon.
#
# From Paul Eggert (2024-05-24):
# The London Gazette, 1903-04-03, page 2245, says that
# as of 1903-03-03 a time ball at the port of Lourenço Marques
# (as Maputo was then called) was dropped daily at 13:00:00 LMT,
# corresponding to 22:49:41.7 GMT, so local time was +02:10:18.3.
# Conversely, the newspaper South Africa, 1909-02-09, page 321,
# says the port had just installed an apparatus that communicated
# "from the controlling clock in the new Observatory at Reuben Point ...
# exact mean South African time, i.e., 30 deg., or 2 hours East of Greenwich".
# Although Shanks gives 1903-03-01 for the transition to CAT,
# evidently the port transitioned to CAT after 1903-03-03 but before
# the Portuguese legal transition of 1912-01-01 (see Europe/Lisbon commentary).
# For lack of better info, list 1909 as the transition date.
#
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Africa/Maputo 2:10:20 - LMT 1903 Mar
#STDOFF 2:10:18.3
Zone Africa/Maputo 2:10:18 - LMT 1909
2:00 - CAT

# Namibia
Expand Down Expand Up @@ -1172,7 +1183,7 @@ Rule Namibia 1995 2017 - Apr Sun>=1 2:00 -1:00 WAT

# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8
1:30 - +0130 1903 Mar
1:30 - %z 1903 Mar
2:00 - SAST 1942 Sep 20 2:00
2:00 1:00 SAST 1943 Mar 21 2:00
2:00 - SAST 1990 Mar 21 # independence
Expand Down Expand Up @@ -1260,7 +1271,7 @@ Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8
Zone Africa/Lagos 0:13:35 - LMT 1905 Jul 1
0:00 - GMT 1908 Jul 1
0:13:35 - LMT 1914 Jan 1
0:30 - +0030 1919 Sep 1
0:30 - %z 1919 Sep 1
1:00 - WAT

# São Tomé and Príncipe
Expand Down
Loading

0 comments on commit 59ffae6

Please sign in to comment.