git: 5dbd160076c0 - stable/13 - contrib/tzdata: import tzdata 2022a

From: Philip Paeps <philip_at_FreeBSD.org>
Date: Mon, 21 Mar 2022 15:27:31 UTC
The branch stable/13 has been updated by philip:

URL: https://cgit.FreeBSD.org/src/commit/?id=5dbd160076c09b0a3c7b175b506a57bd8b71f22a

commit 5dbd160076c09b0a3c7b175b506a57bd8b71f22a
Author:     Philip Paeps <philip@FreeBSD.org>
AuthorDate: 2022-03-21 15:26:58 +0000
Commit:     Philip Paeps <philip@FreeBSD.org>
CommitDate: 2022-03-21 15:26:58 +0000

    contrib/tzdata: import tzdata 2022a
    
    Merge commit '971fa603f2bdf16273135a00ff16c5585520c53f'
    
    Changes: https://github.com/eggert/tz/blob/2022a/NEWS
    
    With this merge, we return to our previous long-standing practice of
    distributing the IANA Time Zone Database unmodified.
    
    Releases of tzdb since 2021b have merged some time zones where clocks
    have agreed since 1970.  The overwhelming majority of users will not be
    affected by this change.  A port of the newly created global-tz fork of
    the IANA Time Zone database (misc/global-tz) is available for users who
    need more granular pre-1970 time zone history.
    
    (cherry picked from commit 8ea5af2b77f2b43c250cacb257f42c0a54d644c4)
---
 contrib/tzdata/CONTRIBUTING      |  73 ++++---
 contrib/tzdata/Makefile          |  62 +++---
 contrib/tzdata/NEWS              | 356 ++++++++++++++++++++++++++++++-
 contrib/tzdata/SECURITY          |  15 ++
 contrib/tzdata/africa            | 128 ++----------
 contrib/tzdata/antarctica        |  29 +--
 contrib/tzdata/asia              |  28 ++-
 contrib/tzdata/australasia       | 109 +++++++++-
 contrib/tzdata/backward          |  11 +-
 contrib/tzdata/backzone          | 437 +++++++++++++++++++++++++++++++++++++--
 contrib/tzdata/checktab.awk      |  50 +++--
 contrib/tzdata/europe            |  76 +++++--
 contrib/tzdata/leap-seconds.list |   8 +-
 contrib/tzdata/leapseconds       |   8 +-
 contrib/tzdata/northamerica      | 266 ++++++++----------------
 contrib/tzdata/southamerica      | 134 ++++++------
 contrib/tzdata/theory.html       |  66 +++---
 contrib/tzdata/version           |   2 +-
 contrib/tzdata/ziguard.awk       |  19 +-
 contrib/tzdata/zone.tab          |   9 +-
 contrib/tzdata/zone1970.tab      |  29 +--
 21 files changed, 1335 insertions(+), 580 deletions(-)

diff --git a/contrib/tzdata/CONTRIBUTING b/contrib/tzdata/CONTRIBUTING
index 01336fce7f74..4c0f56a50265 100644
--- a/contrib/tzdata/CONTRIBUTING
+++ b/contrib/tzdata/CONTRIBUTING
@@ -1,50 +1,58 @@
-Contributing to the tz code and data
+# Contributing to the tz code and data
+
+Please do not create issues or pull requests on GitHub, as the
+proper procedure for proposing and distributing patches is via
+email as described below.
 
 The time zone database is by no means authoritative: governments
 change timekeeping rules erratically and sometimes with little
 warning, the data entries do not cover all of civil time before
 1970, and undoubtedly errors remain in the code and data.  Feel
 free to fill gaps or fix mistakes, and please email improvements
-to tz@iana.org for use in the future.  In your email, please give
+to <tz@iana.org> for use in the future.  In your email, please give
 reliable sources that reviewers can check.
 
------
-
-Developers can contribute technical changes to the source code and
-data as follows.
+## Contributing technical changes
 
 To email small changes, please run a POSIX shell command like
 'diff -u old/europe new/europe >myfix.patch', and attach
-myfix.patch to the email.
+'myfix.patch' to the email.
 
 For more-elaborate or possibly-controversial changes,
 such as renaming, adding or removing zones, please read
-<https://www.iana.org/time-zones/repository/theory.html> or the file
-theory.html.  It is also good to browse the mailing list archives
+"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
+reliable sources as justification.  Citations should use "https:" URLs
 if available.
 
-Please submit changes against either the latest release in
-<https://www.iana.org/time-zones> or the master branch of the development
-repository.  The latter is preferred.  If you use Git the following
-workflow may be helpful:
+For changes that fix sensitive security-related bugs, please see the
+distribution's 'SECURITY' file.
+
+Please submit changes against either the latest release
+<https://www.iana.org/time-zones> or the main branch of the development
+repository.  The latter is preferred.
+
+## Sample Git workflow for developing contributions
+
+If you use Git the following workflow may be helpful:
 
   * Copy the development repository.
 
-      git clone https://github.com/eggert/tz.git
-      cd tz
+        git clone https://github.com/eggert/tz.git
+        cd tz
 
-  * Get current with the master branch.
+  * Get current with the main branch.
 
-      git checkout master
-      git pull
+        git checkout main
+        git pull
 
   * Switch to a new branch for the changes.  Choose a different
     branch name for each change set.
 
-      git checkout -b mybranch
+        git checkout -b mybranch
 
   * Sleuth by using 'git blame'.  For example, when fixing data for
     Africa/Sao_Tome, if the command 'git blame africa' outputs a line
@@ -57,36 +65,33 @@ workflow may be helpful:
 
   * Debug the changes, e.g.:
 
-      make check
-      make install
-      ./zdump -v America/Los_Angeles
+        make check
+        make install
+        ./zdump -v America/Los_Angeles
 
   * For each separable change, commit it in the new branch, e.g.:
 
-      git add northamerica
-      git commit
+        git add northamerica
+        git commit
 
     See recent 'git log' output for the commit-message style.
 
-  * Create patch files 0001-*, 0002-*, ...
+  * Create patch files 0001-..., 0002-..., ...
 
-      git format-patch master
+        git format-patch main
 
-  * After reviewing the patch files, send the patches to tz@iana.org
+  * After reviewing the patch files, send the patches to <tz@iana.org>
     for others to review.
 
-      git send-email master
+        git send-email main
 
     For an archived example of such an email, see
+    "[PROPOSED] Fix off-by-1 error for Jamaica and T&C before 1913"
     <https://mm.icann.org/pipermail/tz/2018-February/026122.html>.
 
-  * Start anew by getting current with the master branch again
+  * Start anew by getting current with the main branch again
     (the second step above).
 
-Please do not create issues or pull requests on GitHub, as the
-proper procedure for proposing and distributing patches is via
-email as illustrated above.
-
 -----
 
 This file is in the public domain.
diff --git a/contrib/tzdata/Makefile b/contrib/tzdata/Makefile
index 1136af9298f1..a9a989ecf394 100644
--- a/contrib/tzdata/Makefile
+++ b/contrib/tzdata/Makefile
@@ -45,9 +45,9 @@ LOCALTIME=	GMT
 #
 # Any other value for POSIXRULES is obsolete and should not be relied on, as:
 # * It does not work correctly in popular implementations such as GNU/Linux.
-# * It does not work in the tzdb implementation for timestamps after 2037.
-# * It is incompatible with 'zic -b slim' if POSIXRULES specifies transitions
-#   at standard time or UT rather than at local time.
+# * It does not work even in tzcode, except for historical timestamps
+#   that precede the last explicit transition in the POSIXRULES file.
+#   Hence it typically does not work for current and future timestamps.
 # In short, software should avoid ruleless settings like TZ='EET-2EEST'
 # and so should not depend on the value of POSIXRULES.
 #
@@ -122,8 +122,8 @@ LIBDIR = $(TOPDIR)/$(USRDIR)/lib
 
 # Types to try, as an alternative to time_t.
 TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES_TAIL)
-TIME_T_ALTERNATIVES_HEAD = int64_t
-TIME_T_ALTERNATIVES_TAIL = int32_t uint32_t uint64_t
+TIME_T_ALTERNATIVES_HEAD = int_least64_t
+TIME_T_ALTERNATIVES_TAIL = int_least32_t uint_least32_t uint_least64_t
 
 # What kind of TZif data files to generate.  (TZif is the binary time
 # zone data format that zic generates; see Internet RFC 8536.)
@@ -152,8 +152,10 @@ REDO=		posix_right
 # The EXPIRES_LINE value matters only if REDO's value contains "right".
 # If you change EXPIRES_LINE, remove the leapseconds file before running "make".
 # zic's support for the Expires line was introduced in tzdb 2020a,
-# and EXPIRES_LINE defaults to 0 for now so that the leapseconds file
-# can be given to older zic implementations.
+# and was modified in tzdb 2021b to generate version 4 TZif files.
+# EXPIRES_LINE defaults to 0 for now so that the leapseconds file
+# can be given to pre-2020a zic implementations and so that TZif files
+# built by newer zic implementations can be read by pre-2021b libraries.
 EXPIRES_LINE=	0
 
 # To install data in text form that has all the information of the TZif data,
@@ -210,6 +212,7 @@ LDLIBS=
 #  -DHAVE_LOCALTIME_R=0 if your system lacks a localtime_r function
 #  -DHAVE_LOCALTIME_RZ=0 if you do not want zdump to use localtime_rz
 #	localtime_rz can make zdump significantly faster, but is nonstandard.
+#  -DHAVE_MALLOC_ERRNO=0 if malloc etc. do not set errno on failure.
 #  -DHAVE_POSIX_DECLS=0 if your system's include files do not declare
 #	functions like 'link' or variables like 'tzname' required by POSIX
 #  -DHAVE_SNPRINTF=0 if your system lacks the snprintf function
@@ -220,7 +223,6 @@ LDLIBS=
 #  -DHAVE_STRTOLL=0 if your system lacks the strtoll function
 #  -DHAVE_SYMLINK=0 if your system lacks the symlink function
 #  -DHAVE_SYS_STAT_H=0 if your compiler lacks a <sys/stat.h>
-#  -DHAVE_SYS_WAIT_H=0 if your compiler lacks a <sys/wait.h>
 #  -DHAVE_TZSET=0 if your system lacks a tzset function
 #  -DHAVE_UNISTD_H=0 if your compiler lacks a <unistd.h>
 #  -Dlocale_t=XXX if your system uses XXX instead of locale_t
@@ -257,22 +259,26 @@ LDLIBS=
 GCC_INSTRUMENT = \
   -fsanitize=undefined -fsanitize-address-use-after-scope \
   -fsanitize-undefined-trap-on-error -fstack-protector
+# Omit -fanalyzer from GCC_DEBUG_FLAGS, as it makes GCC too slow.
 GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \
   $(GCC_INSTRUMENT) \
   -Wall -Wextra \
   -Walloc-size-larger-than=100000 -Warray-bounds=2 \
   -Wbad-function-cast -Wcast-align=strict -Wdate-time \
   -Wdeclaration-after-statement -Wdouble-promotion \
+  -Wduplicated-branches -Wduplicated-cond \
   -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation \
-  -Winit-self -Wjump-misses-init -Wlogical-op \
+  -Winit-self -Wlogical-op \
   -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
+  -Wnull-dereference \
   -Wold-style-definition -Woverlength-strings -Wpointer-arith \
-  -Wshadow -Wshift-overflow=2 -Wstrict-prototypes -Wstringop-overflow=4 \
+  -Wshadow -Wshift-overflow=2 -Wstrict-overflow \
+  -Wstrict-prototypes -Wstringop-overflow=4 \
   -Wstringop-truncation -Wsuggest-attribute=cold \
   -Wsuggest-attribute=const -Wsuggest-attribute=format \
   -Wsuggest-attribute=malloc \
   -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \
-  -Wtrampolines -Wundef -Wuninitialized -Wunused \
+  -Wtrampolines -Wundef -Wuninitialized -Wunused-macros \
   -Wvariadic-macros -Wvla -Wwrite-strings \
   -Wno-address -Wno-format-nonliteral -Wno-sign-compare \
   -Wno-type-limits -Wno-unused-parameter
@@ -393,9 +399,10 @@ ZFLAGS=
 ZIC_INSTALL=	$(ZIC) -d '$(DESTDIR)$(TZDIR)' $(LEAPSECONDS)
 
 # The name of a Posix-compliant 'awk' on your system.
-# Older 'mawk' versions, such as the 'mawk' in Ubuntu 16.04, might dump core;
-# on Ubuntu you can work around this with
-#	AWK=		gawk
+# mawk 1.3.3 and Solaris 10 /usr/bin/awk do not work.
+# Also, it is better (though not essential) if 'awk' supports UTF-8,
+# and unfortunately mawk and busybox awk do not support UTF-8.
+# Try AWK=gawk or AWK=nawk if your awk has the abovementioned problems.
 AWK=		awk
 
 # The full path name of a Posix-compliant shell, preferably one that supports
@@ -460,7 +467,9 @@ OK_LINE=	'^'$(OK_CHAR)'*$$'
 
 # Flags to give 'tar' when making a distribution.
 # Try to use flags appropriate for GNU tar.
-GNUTARFLAGS= --numeric-owner --owner=0 --group=0 --mode=go+u,go-w --sort=name
+GNUTARFLAGS= --format=pax --pax-option='delete=atime,delete=ctime' \
+  --numeric-owner --owner=0 --group=0 \
+  --mode=go+u,go-w --sort=name
 TARFLAGS=	`if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; \
 		 then echo $(GNUTARFLAGS); \
 		 else :; \
@@ -498,7 +507,7 @@ MANTXTS=	newctime.3.txt newstrftime.3.txt newtzset.3.txt \
 			tzfile.5.txt tzselect.8.txt zic.8.txt zdump.8.txt \
 			date.1.txt
 COMMON=		calendars CONTRIBUTING LICENSE Makefile \
-			NEWS README theory.html version
+			NEWS README SECURITY theory.html version
 WEB_PAGES=	tz-art.html tz-how-to.html tz-link.html
 CHECK_WEB_PAGES=check_theory.html check_tz-art.html \
 			check_tz-how-to.html check_tz-link.html
@@ -523,7 +532,7 @@ TZS_YEAR=	2050
 TZS_CUTOFF_FLAG=	-c $(TZS_YEAR)
 TZS=		to$(TZS_YEAR).tzs
 TZS_NEW=	to$(TZS_YEAR)new.tzs
-TZS_DEPS=	$(PRIMARY_YDATA) asctime.c localtime.c \
+TZS_DEPS=	$(YDATA) asctime.c localtime.c \
 			private.h tzfile.h zdump.c zic.c
 # EIGHT_YARDS is just a yard short of the whole ENCHILADA.
 EIGHT_YARDS = $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) tzdata.zi
@@ -533,7 +542,7 @@ ENCHILADA = $(EIGHT_YARDS) $(TZS)
 # This list is not the same as the output of 'git ls-files', since
 # .gitignore is not distributed.
 VERSION_DEPS= \
-		calendars CONTRIBUTING LICENSE Makefile NEWS README \
+		calendars CONTRIBUTING LICENSE Makefile NEWS README SECURITY \
 		africa antarctica asctime.c asia australasia \
 		backward backzone \
 		checklinks.awk checktab.awk \
@@ -736,7 +745,7 @@ date:		$(DATEOBJS)
 tzselect:	tzselect.ksh version
 		VERSION=`cat version` && sed \
 			-e 's|#!/bin/bash|#!$(KSHELL)|g' \
-			-e 's|AWK=[^}]*|AWK=$(AWK)|g' \
+			-e 's|AWK=[^}]*|AWK='\''$(AWK)'\''|g' \
 			-e 's|\(PKGVERSION\)=.*|\1='\''($(PACKAGE)) '\''|' \
 			-e 's|\(REPORT_BUGS_TO\)=.*|\1=$(BUGEMAIL)|' \
 			-e 's|TZDIR=[^}]*|TZDIR=$(TZDIR)|' \
@@ -757,7 +766,7 @@ check_character_set: $(ENCHILADA)
 		sharp='#' && \
 		! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \
 			$(MISC) $(SOURCES) $(WEB_PAGES) \
-			CONTRIBUTING LICENSE README \
+			CONTRIBUTING LICENSE README SECURITY \
 			version tzdata.zi && \
 		! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_'$(OK_CHAR)'*$$' \
 			Makefile && \
@@ -796,9 +805,10 @@ check_links:	checklinks.awk $(TDATA_TO_CHECK) tzdata.zi
 		$(AWK) -f checklinks.awk tzdata.zi
 		touch $@
 
-check_tables:	checktab.awk $(PRIMARY_YDATA) $(ZONETABLES)
+check_tables:	checktab.awk $(YDATA) backward $(ZONETABLES)
 		for tab in $(ZONETABLES); do \
-		  $(AWK) -f checktab.awk -v zone_table=$$tab $(PRIMARY_YDATA) \
+		  test "$$tab" = zone.tab && links='$(BACKWARD)' || links=''; \
+		  $(AWK) -f checktab.awk -v zone_table=$$tab $(YDATA) $$links \
 		    || exit; \
 		done
 		touch $@
@@ -952,6 +962,12 @@ check_public: $(VERSION_DEPS)
 		  public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \
 		done
 		public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK)
+		:
+		: Also check 'backzone' syntax.
+		rm public.dir/main.zi
+		cd public.dir && $(MAKE) PACKRATDATA=backzone main.zi
+		public.dir/zic -d public.dir/zoneinfo main.zi
+		:
 		rm -fr public.dir
 		touch $@
 
@@ -964,7 +980,7 @@ $(TIME_T_ALTERNATIVES): $(VERSION_DEPS)
 		mkdir $@.dir
 		ln $(VERSION_DEPS) $@.dir
 		case $@ in \
-		  int32_t) range=-2147483648,2147483648;; \
+		  int*32_t) range=-2147483648,2147483648;; \
 		  u*) range=0,4294967296;; \
 		  *) range=-4294967296,4294967296;; \
 		esac && \
diff --git a/contrib/tzdata/NEWS b/contrib/tzdata/NEWS
index a60847beae81..ae44be29ff58 100644
--- a/contrib/tzdata/NEWS
+++ b/contrib/tzdata/NEWS
@@ -1,5 +1,351 @@
 News for the tz database
 
+Release 2022a - 2022-03-15 23:02:01 -0700
+
+  Briefly:
+    Palestine will spring forward on 2022-03-27, not -03-26.
+    zdump -v now outputs better failure indications.
+    Bug fixes for code that reads corrupted TZif data.
+
+  Changes to future timestamps
+
+    Palestine will spring forward on 2022-03-27, not 2022-03-26.
+    (Thanks to Heba Hamad.)  Predict future transitions for first
+    Sunday >= March 25.  Additionally, predict fallbacks to be the first
+    Friday on or after October 23, not October's last Friday, to be more
+    consistent with recent practice.  The first differing fallback
+    prediction is on 2025-10-24, not 2025-10-31.
+
+  Changes to past timestamps
+
+    From 1992 through spring 1996, Ukraine's DST transitions were at
+    02:00 standard time, not at 01:00 UTC.  (Thanks to Alois Treindl.)
+
+    Chile's Santiago Mean Time and its LMT precursor have been adjusted
+    eastward by 1 second to align with past and present law.
+
+  Changes to commentary
+
+    Add several references for Chile's 1946/1947 transitions, some of
+    which only affected portions of the country.
+
+  Changes to code
+
+    Fix bug when mktime gets confused by truncated TZif files with
+    unspecified local time.  (Problem reported by Almaz Mingaleev.)
+
+    Fix bug when 32-bit time_t code reads malformed 64-bit TZif data.
+    (Problem reported by Christos Zoulas.)
+
+    When reading a version 2 or later TZif file, the TZif reader now
+    validates the version 1 header and data block only enough to skip
+    over them, as recommended by RFC 8536 section 4.  Also, the TZif
+    reader no longer mistakenly attempts to parse a version 1 TZIf
+    file header as a TZ string.
+
+    zdump -v now outputs "(localtime failed)" and "(gmtime failed)"
+    when local time and UT cannot be determined for a timestamp.
+
+  Changes to build procedure
+
+    Distribution tarballs now use standard POSIX.1-1988 ustar format
+    instead of GNU format.  Although the formats are almost identical
+    for these tarballs, ustar headers' magic fields contain "ustar"
+    instead of "ustar ", and their version fields contain "00" instead
+    of " ".  The two formats are planned to diverge more significantly
+    for tzdb releases after 2242-03-16 12:56:31 UTC, when the ustar
+    format becomes obsolete and the tarballs switch to pax format, an
+    extension of ustar.  For details about these formats, please see
+    "pax - portable archive interchange", IEEE Std 1003.1-2017,
+    <https://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#tag_20_92_13>.
+
+
+Release 2021e - 2021-10-21 18:41:00 -0700
+
+  Changes to future timestamps
+
+    Palestine will fall back 10-29 (not 10-30) at 01:00.
+    (Thanks to P Chan and Heba Hemad.)
+
+
+Release 2021d - 2021-10-15 13:48:18 -0700
+
+  Briefly:
+    Fiji suspends DST for the 2021/2022 season.
+    'zic -r' marks unspecified timestamps with "-00".
+
+  Changes to future timestamps
+
+    Fiji will suspend observance of DST for the 2021/2022 season.
+    Assume for now that it will return next year.  (Thanks to Jashneel
+    Kumar and P Chan.)
+
+  Changes to code
+
+    'zic -r' now uses "-00" time zone abbreviations for intervals
+    with UT offsets that are unspecified due to -r truncation.
+    This implements a change in draft Internet RFC 8536bis.
+
+
+Release 2021c - 2021-10-01 14:21:49 -0700
+
+  Briefly:
+    Revert most 2021b changes to 'backward'.
+    Fix 'zic -b fat' bug in pre-1970 32-bit data.
+    Fix two Link line typos.
+    Distribute SECURITY file.
+
+    This release is intended as a bugfix release, to fix compatibility
+    problems and typos reported since 2021b was released.
+
+  Changes to Link directives
+
+    Revert almost all of 2021b's changes to the 'backward' file,
+    by moving Link directives back to where they were in 2021a.
+    Although 'zic' doesn't care which source file contains a Link
+    directive, some downstream uses ran into trouble with the move.
+    (Problem reported by Stephen Colebourne for Joda-Time.)
+
+    Fix typo that linked Atlantic/Jan_Mayen to the wrong location
+    (problem reported by Chris Walton).
+
+    Fix 'backzone' typo that linked America/Virgin to the wrong
+    location (problem reported by Michael Deckers).
+
+  Changes to code
+
+    Fix a bug in 'zic -b fat' that caused old timestamps to be
+    mishandled in 32-bit-only readers (problem reported by Daniel
+    Fischer).
+
+  Changes to documentation
+
+    Distribute the SECURITY file (problem reported by Andreas Radke).
+
+
+Release 2021b - 2021-09-24 16:23:00 -0700
+
+  Briefly:
+    Jordan now starts DST on February's last Thursday.
+    Samoa no longer observes DST.
+    Merge more location-based Zones whose timestamps agree since 1970.
+    Move some backward-compatibility links to 'backward'.
+    Rename Pacific/Enderbury to Pacific/Kanton.
+    Correct many pre-1993 transitions in Malawi, Portugal, etc.
+    zic now creates each output file or link atomically.
+    zic -L no longer omits the POSIX TZ string in its output.
+    zic fixes for truncation and leap second table expiration.
+    zic now follows POSIX for TZ strings using all-year DST.
+    Fix some localtime crashes and bugs in obscure cases.
+    zdump -v now outputs more-useful boundary cases.
+    tzfile.5 better matches a draft successor to RFC 8536.
+    A new file SECURITY.
+
+    This release is prompted by recent announcements by Jordan and Samoa.
+    It incorporates many other changes that had accumulated since 2021a.
+    However, it omits most proposed changes that merged all Zones
+    agreeing since 1970, as concerns were raised about doing too many of
+    these changes at once.  It does keeps some of these changes in the
+    interest of making tzdb more equitable one step at a time; see
+    "Merge more location-based Zones" below.
+
+  Changes to future timestamps
+
+    Jordan now starts DST on February's last Thursday.
+    (Thanks to Steffen Thorsen.)
+
+    Samoa no longer observes DST.  (Thanks to Geoffrey D. Bennett.)
+
+  Changes to zone name
+
+    Rename Pacific/Enderbury to Pacific/Kanton.  When we added
+    Enderbury in 1993, we did not know that it is uninhabited and that
+    Kanton (population two dozen) is the only inhabited location in
+    that timezone.  The old name is now a backward-compatility link.
+
+  Changes to past timestamps
+
+    Correct many pre-1993 transitions, fixing entries originally
+    derived from Shanks, Whitman, and Mundell.  The fixes include:
+      - Barbados: standard time was introduced in 1911, not 1932; and
+	DST was observed in 1942-1944
+      - Cook Islands: In 1899 they switched from east to west of GMT,
+	celebrating Christmas for two days.  They (and Niue) switched
+	to standard time in 1952, not 1901.
+      - Guyana: corrected LMT for Georgetown; the introduction of
+	standard time in 1911, not 1915; and corrections to 1975 and
+	1992 transitions
+      - Kanton: uninhabited before 1937-08-31
+      - Niue: only observed -11:20 from 1952 through 1964, then went to
+        -11 instead of -11:30
+      - Portugal: DST was observed in 1950
+      - Tonga: corrected LMT; the introduction of standard time in 1945,
+        not 1901; and corrections to the transition from +12:20 to +13
+        in 1961, not 1941
+    Additional fixes to entries in the 'backzone' file include:
+      - Enderbury: inhabited only 1860/1885 and 1938-03-06/1942-02-09
+      - The Gambia: 1933 and 1942 transitions
+      - Malawi: several 1911 through 1925 transitions
+      - Sierra Leone: several 1913 through 1941 transitions, and DST
+	was NOT observed in 1957 through 1962
+    (Thanks to P Chan, Michael Deckers, Alexander Krivenyshev and
+    Alois Treindl.)
+
+    Merge more location-based Zones whose timestamps agree since 1970,
+    as pre-1970 timestamps are out of scope.  This is part of a
+    process that has been ongoing since 2013.  This does not affect
+    post-1970 timestamps, and timezone historians who build with 'make
+    PACKRATDATA=backzone' should see no changes to pre-1970 timestamps.
+    When merging, keep the most-populous location's data, and move
+    data for other locations to 'backzone' with a backward
+    link in 'backward'.  For example, move America/Creston data to
+    'backzone' with a link in 'backward' from America/Phoenix because
+    the two timezones' timestamps agree since 1970; this change
+    affects some pre-1968 timestamps in America/Creston because
+    Creston and Phoenix disagreed before 1968.  The affected Zones
+    are Africa/Accra, America/Atikokan, America/Blanc-Sablon,
+    America/Creston, America/Curacao, America/Nassau,
+    America/Port_of_Spain, Antarctica/DumontDUrville, and
+    Antarctica/Syowa.
+
+  Changes to maintenance procedure
+
+    The new file SECURITY covers how to report security-related bugs.
+
+    Several backward-compatibility links have been moved to the
+    'backward' file.  These links, which range from Africa/Addis_Ababa
+    to Pacific/Saipan, are only for compatibility with now-obsolete
+    guidelines suggesting an entry for every ISO 3166 code.
+    The intercontinental convenience links Asia/Istanbul and
+    Europe/Nicosia have also been moved to 'backward'.
+
+  Changes to code
+
+    zic now creates each output file or link atomically,
+    possibly by creating a temporary file and then renaming it.
+    This avoids races where a TZ setting would temporarily stop
+    working while zic was installing a replacement file or link.
+
+    zic -L no longer omits the POSIX TZ string in its output.
+    Starting with 2020a, zic -L truncated its output according to the
+    "Expires" directive or "#expires" comment in the leapseconds file.
+    The resulting TZif files omitted daylight saving transitions after
+    the leap second table expired, which led to far less-accurate
+    predictions of times after the expiry.  Although future timestamps
+    cannot be converted accurately in the presence of leap seconds, it
+    is more accurate to convert near-future timestamps with a few
+    seconds error than with an hour error, so zic -L no longer
+    truncates output in this way.
+
+    Instead, when zic -L is given the "Expires" directive, it now
+    outputs the expiration by appending a no-change entry to the leap
+    second table.  Although this should work well with most TZif
+    readers, it does not conform to Internet RFC 8536 and some pickier
+    clients (including tzdb 2017c through 2021a) reject it, so
+    "Expires" directives are currently disabled by default.  To enable
+    them, set the EXPIRES_LINE Makefile variable.  If a TZif file uses
+    this new feature it is marked with a new TZif version number 4,
+    a format intended to be documented in a successor to RFC 8536.
+
+    zic -L LEAPFILE -r @LO no longer generates an invalid TZif file
+    that omits leap second information for the range LO..B when LO
+    falls between two leap seconds A and B.  Instead, it generates a
+    TZif version 4 file that represents the previously-missing
+    information.
+
+    The TZif reader now allows the leap second table to begin with a
+    correction other than -1 or +1, and to contain adjacent
+    transitions with equal corrections.  This supports TZif version 4.
+
+    The TZif reader now lets leap seconds occur less than 28 days
+    apart.  This supports possible future TZif extensions.
+
+    Fix bug that caused 'localtime' etc. to crash when TZ was
+    set to a all-year DST string like "EST5EDT4,0/0,J365/25" that does
+    not conform to POSIX but does conform to Internet RFC 8536.
+
+    Fix another bug that caused 'localtime' etc. to crash when TZ was
+    set to a POSIX-conforming but unusual TZ string like
+    "EST5EDT4,0/0,J365/0", where almost all the year is DST.
+
+    Fix yet another bug that caused 'localtime' etc. to mishandle slim
+    TZif files containing leap seconds after the last explicit
+    transition in the table, or when handling far-future timestamps
+    in slim TZif files lacking leap seconds.
+
+    Fix localtime misbehavior involving positive leap seconds.
+    This change affects only behavior for "right" system time,
+    which contains leap seconds, and only if the UT offset is
+    not a multiple of 60 seconds when a positive leap second occurs.
+    (No such timezone exists in tzdb, luckily.)  Without the fix,
+    the timestamp was ambiguous during a positive leap second.
+    With the fix, any seconds occurring after a positive leap second
+    and within the same localtime minute are counted through 60, not
+    through 59; their UT offset (tm_gmtoff) is the same as before.
+    Here is how the fix affects timestamps in a timezone with UT
+    offset +01:23:45 (5025 seconds) and with a positive leap second at
+    1972-06-30 23:59:60 UTC (78796800):
+
+	time_t    without the fix      with the fix
+	78796800  1972-07-01 01:23:45  1972-07-01 01:23:45 (leap second)
+	78796801  1972-07-01 01:23:45  1972-07-01 01:23:46
+	...
+	78796815  1972-07-01 01:23:59  1972-07-01 01:23:60
+	78796816  1972-07-01 01:24:00  1972-07-01 01:24:00
+
+    Fix an unlikely bug that caused 'localtime' etc. to misbehave if
+    civil time changes a few seconds before time_t wraps around, when
+    leap seconds are enabled.
+
+    Fix bug in zic -r; in some cases, the dummy time type after the
+    last time transition disagreed with the TZ string, contrary to
+    Internet RFC 8563 section 3.3.
+
+    Fix a bug with 'zic -r @X' when X is a negative leap second that
+    has a nonnegative correction.  Without the fix, the output file
+    was truncated so that X appeared to be a positive leap second.
+    Fix a similar, even-less-likely bug when truncating at a positive
+    leap second that has a nonpositive correction.
+
+    zic -r now reports an error if given rolling leap seconds, as this
+    usage has never generally worked and is evidently unused.
+
+    zic now generates a POSIX-conforming TZ string for TZif files
+    where all-year DST is predicted for the indefinite future.
+    For example, for all-year Eastern Daylight Time, zic now generates
+    "XXX3EDT4,0/0,J365/23" where it previously generated
+    "EST5EDT,0/0,J365/25" or "".  (Thanks to Michael Deckers for
+    noting the possibility of POSIX conformance.)
+
+    zic.c no longer requires sys/wait.h (thanks to spazmodius for
+    noting it wasn't needed).
+
+    When reading slim TZif files, zdump no longer mishandles leap
+    seconds on the rare platforms where time_t counts leap seconds,
+    fixing a bug introduced in 2014g.
+
+    zdump -v now outputs timestamps at boundaries of what localtime
+    and gmtime can represent, instead of the less-useful timestamps
+    one day after the minimum and one day before the maximum.
+    (Thanks to Arthur David Olson for prototype code, and to Manuela
+    Friedrich for debugging help.)
+
+    zdump's -c and -t options are now consistently inclusive for the
+    lower time bound and exclusive for the upper.  Formerly they were
+    inconsistent.  (Confusion noted by Martin Burnicki.)
+
+  Changes to build procedure
+
+    You can now compile with -DHAVE_MALLOC_ERRNO=0 to port to
+    non-POSIX hosts where malloc doesn't set errno.
+    (Problem reported by Jan Engelhardt.)
+
+  Changes to documentation
+
+    tzfile.5 better matches a draft successor to RFC 8536
+    <https://datatracker.ietf.org/doc/draft-murchison-rfc8536bis/01/>.
+
+
 Release 2021a - 2021-01-24 10:54:57 -0800
 
   Changes to future timestamps
@@ -31,7 +377,7 @@ Release 2020e - 2020-12-22 15:14:34 -0800
     Correct many pre-1986 transitions, fixing entries originally
     derived from Shanks.  The fixes include:
       - Australia: several 1917 through 1971 transitions
-      - Bahamas: several 1941 through 1945 transitions
+      - The Bahamas: several 1941 through 1945 transitions
       - Bermuda: several 1917 through 1956 transitions
       - Belize: several 1942 through 1968 transitions
       - Ghana: several 1915 through 1956 transitions
@@ -287,13 +633,13 @@ Release 2019c - 2019-09-11 08:59:48 -0700
     probably wrong.)
 
     Fix several errors in pre-1970 transitions in Perry County, IN.
-    (Thanks to Alois Triendl for pointing out the 1967/9 errors.)
+    (Thanks to Alois Treindl for pointing out the 1967/9 errors.)
 
     Edmonton did not observe DST in 1967 or 1969.  In 1946 Vancouver
     ended DST on 09-29 not 10-13, and Vienna ended DST on 10-07 not
     10-06.  In 1945 Königsberg (now Kaliningrad) switched from +01/+02
     to +02/+03 on 04-10 not 01-01, and its +02/+03 is abbreviated
-    EET/EEST, not CET/CEST.  (Thanks to Alois Triendl.)  In 1946
+    EET/EEST, not CET/CEST.  (Thanks to Alois Treindl.)  In 1946
     Königsberg switched to +03 on 04-07 not 01-01.
 
     In 1946 Louisville switched from CST to CDT on 04-28 at 00:01, not
@@ -825,8 +1171,8 @@ Release 2018d - 2018-03-22 07:05:46 -0700
     Institute in Montevideo.
     (Thanks to Jeremie Bonjour, Tim Parenti, and Michael Deckers.)
 
-    Enderbury and Kiritimati skipped New Year's Eve 1994, not
-    New Year's Day 1995.  (Thanks to Kerry Shetline.)
+    East Kiribati skipped New Year's Eve 1994, not New Year's Day 1995.
+    (Thanks to Kerry Shetline.)
 
     Fix the 1912-01-01 transition for Portugal and its colonies.
     This transition was at 00:00 according to the new UT offset, not
diff --git a/contrib/tzdata/SECURITY b/contrib/tzdata/SECURITY
new file mode 100644
index 000000000000..40128bc86dd2
--- /dev/null
+++ b/contrib/tzdata/SECURITY
@@ -0,0 +1,15 @@
+Please report any sensitive security-related bugs via email to the
+tzdb designated coordinators, currently Paul Eggert
+<eggert@cs.ucla.edu> and Tim Parenti <tim@timtimeonline.com>.
+Put "tzdb security" at the start of your email's subject line.
+We prefer communications to be in English.
+
+You should receive a response within a week. If not, please follow up
+via email to make sure we received your original message.
+
+If we confirm the bug, we plan to notify affected third-party services
+or software that we know about, prepare an advisory, commit fixes to
+the main development branch as quickly as is practical, and finally
+publish the advisory on tz@iana.org.  As with all tzdb contributions,
+we give credit to security contributors unless they wish to remain
+anonymous.
diff --git a/contrib/tzdata/africa b/contrib/tzdata/africa
index 28168cfc17f8..4bf491e99d50 100644
--- a/contrib/tzdata/africa
+++ b/contrib/tzdata/africa
@@ -30,9 +30,6 @@
 # Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94.
 # https://www.jstor.org/stable/1774359
 #
-# A reliable and entertaining source about time zones is
-# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997).
-#
 # European-style abbreviations are commonly used along the Mediterranean.
 # For sub-Saharan Africa abbreviations were less standardized.
 # Previous editions of this database used WAT, CAT, SAT, and EAT
@@ -153,8 +150,9 @@ Zone	Africa/Ndjamena	1:00:12 -	LMT	1912        # N'Djamena
 # Zone	NAME		STDOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Abidjan	-0:16:08 -	LMT	1912
 			 0:00	-	GMT
+Link Africa/Abidjan Africa/Accra	# Ghana
 Link Africa/Abidjan Africa/Bamako	# Mali
-Link Africa/Abidjan Africa/Banjul	# Gambia
+Link Africa/Abidjan Africa/Banjul	# The Gambia
 Link Africa/Abidjan Africa/Conakry	# Guinea
 Link Africa/Abidjan Africa/Dakar	# Senegal
 Link Africa/Abidjan Africa/Freetown	# Sierra Leone
@@ -381,93 +379,8 @@ Zone	Africa/Cairo	2:05:09 -	LMT	1900 Oct
 # Gabon
 # See Africa/Lagos.
 
-# Gambia
-# See Africa/Abidjan.
-
+# The Gambia
 # Ghana
-
-# From P Chan (2020-11-20):
-# Interpretation Amendment Ordinance, 1915 (No.24 of 1915) [1915-11-02]
-# Ordinances of the Gold Coast, Ashanti, Northern Territories 1915, p 69-71
-# https://books.google.com/books?id=ErA-AQAAIAAJ&pg=PA70
-# This Ordinance added "'Time' shall mean Greenwich Mean Time" to the
-# Interpretation Ordinance, 1876.
-#
-# Determination of the Time Ordinance, 1919 (No. 18 of 1919) [1919-11-24]
-# Ordinances of the Gold Coast, Ashanti, Northern Territories 1919, p 75-76
-# https://books.google.com/books?id=MbA-AQAAIAAJ&pg=PA75
-# This Ordinance removed the previous definition of time and introduced DST.
-#
-# Time Determination Ordinance (Cap. 214)
-# The Laws of the Gold Coast (including Togoland Under British Mandate)
-# Vol. II (1937), p 2328
-# https://books.google.com/books?id=Z7M-AQAAIAAJ&pg=PA2328
-# Revised edition of the 1919 Ordinance.
-#
-# Time Determination (Amendment) Ordinance, 1940 (No. 9 of 1940) [1940-04-06]
-# Annual Volume of the Laws of the Gold Coast:
-# Containing All Legislation Enacted During Year 1940, p 22
-# https://books.google.com/books?id=1ao-AQAAIAAJ&pg=PA22
-# This Ordinance changed the forward transition from September to May.
-#
-# Defence (Time Determination Ordinance Amendment) Regulations, 1942
-# (Regulations No. 6 of 1942) [1942-01-31, commenced on 1942-02-08]
-# Annual Volume of the Laws of the Gold Coast:
-# Containing All Legislation Enacted During Year 1942, p 48
-# https://books.google.com/books?id=Das-AQAAIAAJ&pg=PA48
-# These regulations advanced the [standard] time by thirty minutes.
-#
-# Defence (Time Determination Ordinance Amendment (No.2)) Regulations,
-# 1942 (Regulations No. 28 of 1942) [1942-04-25]
-# Annual Volume of the Laws of the Gold Coast:
-# Containing All Legislation Enacted During Year 1942, p 87
-# https://books.google.com/books?id=Das-AQAAIAAJ&pg=PA87
-# These regulations abolished DST and changed the time to GMT+0:30.
-#
-# Defence (Revocation) (No.4) Regulations, 1945 (Regulations No. 45 of
-# 1945) [1945-10-24, commenced on 1946-01-06]
-# Annual Volume of the Laws of the Gold Coast:
-# Containing All Legislation Enacted During Year 1945, p 256
-# https://books.google.com/books?id=9as-AQAAIAAJ&pg=PA256
-# These regulations revoked the previous two sets of Regulations.
-#
-# Time Determination (Amendment) Ordinance, 1945 (No. 18 of 1945) [1946-01-06]
-# Annual Volume of the Laws of the Gold Coast:
-# Containing All Legislation Enacted During Year 1945, p 69
-# https://books.google.com/books?id=9as-AQAAIAAJ&pg=PA69
-# This Ordinance abolished DST.
-#
-# Time Determination (Amendment) Ordinance, 1950 (No. 26 of 1950) [1950-07-22]
-# Annual Volume of the Laws of the Gold Coast:
-# Containing All Legislation Enacted During Year 1950, p 35
-# https://books.google.com/books?id=e60-AQAAIAAJ&pg=PA35
-# This Ordinance restored DST but with thirty minutes offset.
-#
-# Time Determination Ordinance (Cap. 264)
-# The Laws of the Gold Coast, Vol. V (1954), p 380
-# https://books.google.com/books?id=Mqc-AQAAIAAJ&pg=PA380
-# Revised edition of the Time Determination Ordinance.
-#
-# Time Determination (Amendment) Ordinance, 1956 (No. 21 of 1956) [1956-08-29]
-# Annual Volume of the Ordinances of the Gold Coast Enacted During the
-# Year 1956, p 83
-# https://books.google.com/books?id=VLE-AQAAIAAJ&pg=PA83
-# This Ordinance abolished DST.
-
-# Rule	NAME	FROM	TO	-	IN	ON	AT	SAVE	LETTER/S
-Rule	Ghana	1919	only	-	Nov	24	0:00	0:20	+0020
-Rule	Ghana	1920	1942	-	Jan	 1	2:00	0	GMT
-Rule	Ghana	1920	1939	-	Sep	 1	2:00	0:20	+0020
-Rule	Ghana	1940	1941	-	May	 1	2:00	0:20	+0020
-Rule	Ghana	1950	1955	-	Sep	 1	2:00	0:30	+0030
-Rule	Ghana	1951	1956	-	Jan	 1	2:00	0	GMT
-
-# Zone	NAME		STDOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Accra	-0:00:52 -	LMT	1915 Nov  2
-			 0:00	Ghana	%s	1942 Feb  8
-			 0:30	-	+0030	1946 Jan  6
-			 0:00	Ghana	%s
-
 # Guinea
 # See Africa/Abidjan.
 
@@ -732,7 +645,7 @@ Zone Indian/Mauritius	3:50:00 -	LMT	1907 # Port Louis
 # See Africa/Nairobi.
 
 # Morocco
-# See the 'europe' file for Spanish Morocco (Africa/Ceuta).
+# See Africa/Ceuta for Spanish Morocco.
 
 # From Alex Krivenyshev (2008-05-09):
 # Here is an article that Morocco plan to introduce Daylight Saving Time between
@@ -1005,6 +918,10 @@ Zone Indian/Mauritius	3:50:00 -	LMT	1907 # Port Louis
 #         (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a))
 #         (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b)))))
 #     (setq islamic-year (+ 1 islamic-year))))
+#
+# From Milamber (2021-03-31, 2022-03-10), confirming these predictions:
+# https://www.mmsp.gov.ma/fr/actualites.aspx?id=2076
+# https://www.ecoactu.ma/horaires-administration-ramadan-gmtheure-gmt-a-partir-de-dimanche-27-mars/
 
 # Rule	NAME	FROM	TO	-	IN	ON	AT	SAVE	LETTER/S
 Rule	Morocco	1939	only	-	Sep	12	 0:00	1:00	-
@@ -1382,23 +1299,21 @@ Zone	Africa/Lagos	0:13:35 -	LMT	1905 Jul  1
 			0:13:35	-	LMT	1914 Jan  1
 			0:30	-	+0030	1919 Sep  1
 			1:00	-	WAT
-Link Africa/Lagos Africa/Bangui	     # Central African Republic
-Link Africa/Lagos Africa/Brazzaville # Rep. of the Congo
-Link Africa/Lagos Africa/Douala	     # Cameroon
-Link Africa/Lagos Africa/Kinshasa    # Dem. Rep. of the Congo (west)
-Link Africa/Lagos Africa/Libreville  # Gabon
-Link Africa/Lagos Africa/Luanda	     # Angola
-Link Africa/Lagos Africa/Malabo	     # Equatorial Guinea
-Link Africa/Lagos Africa/Niamey	     # Niger
-Link Africa/Lagos Africa/Porto-Novo  # Benin
+Link Africa/Lagos Africa/Bangui		# Central African Republic
+Link Africa/Lagos Africa/Brazzaville	# Rep. of the Congo
+Link Africa/Lagos Africa/Douala		# Cameroon
+Link Africa/Lagos Africa/Kinshasa	# Dem. Rep. of the Congo (west)
+Link Africa/Lagos Africa/Libreville	# Gabon
+Link Africa/Lagos Africa/Luanda		# Angola
+Link Africa/Lagos Africa/Malabo		# Equatorial Guinea
+Link Africa/Lagos Africa/Niamey		# Niger
+Link Africa/Lagos Africa/Porto-Novo	# Benin
 
 # Réunion
 # Zone	NAME		STDOFF	RULES	FORMAT	[UNTIL]
 Zone	Indian/Reunion	3:41:52 -	LMT	1911 Jun # Saint-Denis
 			4:00	-	+04
 #
-# Crozet Islands also observes Réunion time; see the 'antarctica' file.
-#
 # Scattered Islands (Îles Éparses) administered from Réunion are as follows.
 # The following information about them is taken from
 # Îles Éparses (<http://www.outre-mer.gouv.fr/domtom/ile.htm>, 1997-07-22,
@@ -1490,8 +1405,8 @@ Rule	SA	1943	1944	-	Mar	Sun>=15	2:00	0	-
 Zone Africa/Johannesburg 1:52:00 -	LMT	1892 Feb 8
 			1:30	-	SAST	1903 Mar
 			2:00	SA	SAST
-Link Africa/Johannesburg Africa/Maseru	   # Lesotho
-Link Africa/Johannesburg Africa/Mbabane    # Eswatini
+Link Africa/Johannesburg Africa/Maseru	# Lesotho
+Link Africa/Johannesburg Africa/Mbabane	# Eswatini
 #
 # Marion and Prince Edward Is
 # scientific station since 1947
@@ -1527,12 +1442,13 @@ Zone	Africa/Khartoum	2:10:08 -	LMT	1931
 			3:00	-	EAT	2017 Nov  1
 			2:00	-	CAT
 
+# South Sudan
+
 # From Steffen Thorsen (2021-01-18):
 # "South Sudan will change its time zone by setting the clock back 1
 # hour on February 1, 2021...."
 # from https://eyeradio.org/south-sudan-adopts-new-time-zone-makuei/
 
-# South Sudan
 # Zone	NAME		STDOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Juba	2:06:28 -	LMT	1931
 			2:00	Sudan	CA%sT	2000 Jan 15 12:00
@@ -1637,7 +1553,7 @@ Rule	Tunisia	2005	only	-	Sep	30	 1:00s	0	-
 Rule	Tunisia	2006	2008	-	Mar	lastSun	 2:00s	1:00	S
*** 2248 LINES SKIPPED ***