svn commit: r53502 - in head/share: security/advisories security/patches/EN-19:18 xml
Gordon Tetlow
gordon at FreeBSD.org
Wed Oct 23 03:36:39 UTC 2019
Author: gordon (src committer)
Date: Wed Oct 23 03:36:38 2019
New Revision: 53502
URL: https://svnweb.freebsd.org/changeset/doc/53502
Log:
Add FreeBSD-EN-19:18.tzdata.
Approved by: so
Added:
head/share/security/advisories/FreeBSD-EN-19:18.tzdata.asc (contents, props changed)
head/share/security/patches/EN-19:18/
head/share/security/patches/EN-19:18/tzdata-2019c.patch (contents, props changed)
head/share/security/patches/EN-19:18/tzdata-2019c.patch.asc (contents, props changed)
Modified:
head/share/xml/notices.xml
Added: head/share/security/advisories/FreeBSD-EN-19:18.tzdata.asc
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/share/security/advisories/FreeBSD-EN-19:18.tzdata.asc Wed Oct 23 03:36:38 2019 (r53502)
@@ -0,0 +1,152 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA512
+
+=============================================================================
+FreeBSD-EN-19:18.tzdata Errata Notice
+ The FreeBSD Project
+
+Topic: Timezone database information update
+
+Category: contrib
+Module: zoneinfo
+Announced: 2019-10-23
+Affects: All supported versions of FreeBSD.
+Corrected: 2019-09-15 10:54:18 UTC (stable/12, 12.1-STABLE)
+ 2019-10-23 03:25:32 UTC (releng/12.0, 12.0-RELEASE-p11)
+ 2019-09-15 10:54:33 UTC (stable/11, 11.3-STABLE)
+ 2019-10-23 03:25:32 UTC (releng/11.3, 11.3-RELEASE-p4)
+ 2019-10-23 03:25:32 UTC (releng/11.2, 11.2-RELEASE-p15)
+
+Note: The upcoming release of FreeBSD 12.1 was branched after the original
+commit to the stable branch and already includes the updated timezone
+information.
+
+For general information regarding FreeBSD Errata Notices and Security
+Advisories, including descriptions of the fields above, security
+branches, and the following sections, please visit
+<URL:https://security.FreeBSD.org/>.
+
+I. Background
+
+The tzsetup(8) program allows the user to specify the default local timezone.
+Based on the selected timezone, tzsetup(8) copies one of the files from
+/usr/share/zoneinfo to /etc/localtime. This file actually controls the
+conversion.
+
+II. Problem Description
+
+Several changes in Daylight Savings Time happened after previous FreeBSD
+releases were released that would affect many people who live in different
+countries. Because of these changes, the data in the zoneinfo files need to
+be updated, and if the local timezone on the running system is affected,
+tzsetup(8) needs to be run so the /etc/localtime is updated.
+
+III. Impact
+
+An incorrect time will be displayed on a system configured to use one of the
+affected timezones if the /usr/share/zoneinfo and /etc/localtime files are
+not updated, and all applications on the system that rely on the system time,
+such as cron(8) and syslog(8), will be affected.
+
+IV. Workaround
+
+The system administrator can install an updated timezone database from the
+misc/zoneinfo port and run tzsetup(8) to get the timezone database corrected.
+
+Applications that store and display times in Coordinated Universal Time (UTC)
+are not affected.
+
+V. Solution
+
+Please note that some third party software, for instance PHP, Ruby, Java and
+Perl, may be using different zoneinfo data source, in such cases this
+software must be updated separately. For software packages that is installed
+via binary packages, they can be upgraded by executing `pkg upgrade'.
+
+Following the instructions in this Errata Notice will update all of the
+zoneinfo files to be the same as what was released with FreeBSD release.
+
+Perform one of the following:
+
+1) Upgrade your system to a supported FreeBSD stable or release / security
+branch (releng) dated after the correction date. Restart all the affected
+applications and daemons, or reboot the system.
+
+2) To update your system via a binary patch:
+
+Systems running a RELEASE version of FreeBSD on the i386 or amd64
+platforms can be updated via the freebsd-update(8) utility:
+
+# freebsd-update fetch
+# freebsd-update install
+
+Restart all the affected applications and daemons, or reboot the system.
+
+3) To update your system via a source code patch:
+
+The following patches have been verified to apply to the applicable
+FreeBSD release branches.
+
+a) Download the relevant patch from the location below, and verify the
+detached PGP signature using your PGP utility.
+
+# fetch https://security.FreeBSD.org/patches/EN-19:18/tzdata-2019c.patch
+# fetch https://security.FreeBSD.org/patches/EN-19:18/tzdata-2019c.patch.asc
+# gpg --verify tzdata-2019c.patch.asc
+
+b) Apply the patch. Execute the following commands as root:
+
+# cd /usr/src
+# patch < /path/to/patch
+
+c) Recompile the operating system using buildworld and installworld as
+described in <URL:https://www.FreeBSD.org/handbook/makeworld.html>.
+
+Restart all the affected applications and daemons, or reboot the system.
+
+VI. Correction details
+
+The following list contains the correction revision numbers for each
+affected branch.
+
+Branch/path Revision
+- -------------------------------------------------------------------------
+stable/12/ r352353
+releng/12.0/ r353915
+stable/11/ r352354
+releng/11.3/ r353915
+releng/11.2/ r353915
+- -------------------------------------------------------------------------
+
+To see which files were modified by a particular revision, run the
+following command, replacing NNNNNN with the revision number, on a
+machine with Subversion installed:
+
+# svn diff -cNNNNNN --summarize svn://svn.freebsd.org/base
+
+Or visit the following URL, replacing NNNNNN with the revision number:
+
+<URL:https://svnweb.freebsd.org/base?view=revision&revision=NNNNNN>
+
+VII. References
+
+The latest revision of this advisory is available at
+<URL:https://security.FreeBSD.org/advisories/FreeBSD-EN-19:18.tzdata.asc>
+-----BEGIN PGP SIGNATURE-----
+
+iQKTBAEBCgB9FiEE/A6HiuWv54gCjWNV05eS9J6n5cIFAl2vybFfFIAAAAAALgAo
+aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEZD
+MEU4NzhBRTVBRkU3ODgwMjhENjM1NUQzOTc5MkY0OUVBN0U1QzIACgkQ05eS9J6n
+5cKPExAAmtnxSlDJGtLzpO8YGTrQI4VNIwmk70cxu3cdwhwWvvBR/JzedaV136iK
+CiYqIdMa0FERKFKRhN9VH5KPrZIYubg8vGgLcc7aaLFMYotOaWsZGm4p5bZmRUxK
+VgbEqTFIEmOM7+rlNqov73emsQTvSX1T02i/KToTMGXLLlBZZjwFCDd9w9cXNUnO
+8/CsrHi3mPeeCIF4dKgg31xSM6emO3dJXdJJ6gXaVprv8KKbMUSxzEtrYGslE9eS
+6HDBsZVsde/hgc8VFAA19QwiWkjYzaiCUax9yutozYOjbvwxLUUN08/zR8B+GyU9
+SnJPN7RvmqRpybLQHVdvds2mSr3v3+ADo+hdW8oBNpiwJ99gCuzB8qJaIfTPstOo
+BZo7GaM+MGE94/0cjjhk4AB1FyBlTCMz5Xr0t07mk/65/PmXyg77xkcL1m23RJFi
+cZfC0K6X00KfDt5N/1OwvEiBKUamNHQvDfhbb2pclYEysOSWJVrkWB9En1TMwPQX
+oncaSjqiJhRarleoQhvs7FwqYffaFvEUTrvfzK8KaAqm4wFd0P8ExTVnPCxy1Frz
+68KdJJ7e1+uxsHy8+cGgnH4W8+0KP4CNSXqEDUiOV2iw9LwGmZnhEpjGseO1/4Z4
+bOkP7gzEHtkN/k6/OnOu8NiDiR5rUvyq+SoHUlaiP6/Oo11EZBk=
+=cMXm
+-----END PGP SIGNATURE-----
Added: head/share/security/patches/EN-19:18/tzdata-2019c.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/share/security/patches/EN-19:18/tzdata-2019c.patch Wed Oct 23 03:36:38 2019 (r53502)
@@ -0,0 +1,1315 @@
+--- contrib/tzdata/NEWS.orig
++++ contrib/tzdata/NEWS
+@@ -1,5 +1,80 @@
+ News for the tz database
+
++Release 2019c - 2019-09-11 08:59:48 -0700
++
++ Briefly:
++ Fiji observes DST from 2019-11-10 to 2020-01-12.
++ Norfolk Island starts observing Australian-style DST.
++
++ Changes to future timestamps
++
++ Fiji's next DST transitions will be 2019-11-10 and 2020-01-12
++ instead of 2019-11-03 and 2020-01-19. (Thanks to Raymond Kumar.)
++ Adjust future guesses accordingly.
++
++ Norfolk Island will observe Australian-style DST starting in
++ spring 2019. The first transition is on 2019-10-06. (Thanks to
++ Kyle Czech and Michael Deckers.)
++
++ Changes to past timestamps
++
++ Many corrections to time in Turkey from 1940 through 1985.
++ (Thanks to Oya Vulaş via Alois Treindl, and to Kıvanç Yazan.)
++
++ The Norfolk Island 1975-03-02 transition was at 02:00 standard
++ time, not 02:00 DST. (Thanks to Michael Deckers.)
++
++ South Korea observed DST from 1948 through 1951. Although this
++ info was supposed to appear in release 2014j, a typo inadvertently
++ suppressed the change. (Thanks to Alois Treindl.)
++
++ Detroit observed DST in 1967 and 1968 following the US DST rules,
++ except that its 1967 DST began on June 14 at 00:01. (Thanks to
++ Alois Treindl for pointing out that the old data entries were
++ probably wrong.)
++
++ Fix several errors in pre-1970 transitions in Perry County, IN.
++ (Thanks to Alois Triendl 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
++ 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
++ 01-01 at 00:00. (Thanks to Alois Treindl and Michael Deckers.)
++ Also, it switched from CST to CDT on 1950-04-30, not 1947-04-27.
++
++ The 1892-05-01 transition in Brussels was at 00:17:30, not at noon.
++ (Thanks to Michael Deckers.)
++
++ Changes to past time zone abbreviations and DST flags
++
++ Hong Kong Winter Time, observed from 1941-10-01 to 1941-12-25,
++ is now flagged as DST and is abbreviated HKWT not HKT.
++
++ Changes to code
++
++ leapseconds.awk now relies only on its input data, rather than
++ also relying on its comments. (Inspired by code from Dennis
++ Ferguson and Chris Woodbury.)
++
++ The code now defends against CRLFs in leap-seconds.list.
++ (Thanks to Brian Inglis and Chris Woodbury.)
++
++ Changes to documentation and commentary
++
++ theory.html discusses leap seconds. (Thanks to Steve Summit.)
++
++ Nashville's newspapers dueled about the time of day in the 1950s.
++ (Thanks to John Seigenthaler.)
++
++ Liechtenstein observed Swiss DST in 1941/2.
++ (Thanks to Alois Treindl.)
++
++
+ Release 2019b - 2019-07-01 00:09:53 -0700
+
+ Briefly:
+--- contrib/tzdata/asia.orig
++++ contrib/tzdata/asia
+@@ -8,7 +8,7 @@
+ # tz at iana.org for general use in the future). For more, please see
+ # the file CONTRIBUTING in the tz distribution.
+
+-# From Paul Eggert (2018-06-19):
++# From Paul Eggert (2019-07-11):
+ #
+ # Unless otherwise specified, the source for data through 1990 is:
+ # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition),
+@@ -47,13 +47,13 @@
+ # 7:00 WIB west Indonesia (Waktu Indonesia Barat)
+ # 8:00 WITA central Indonesia (Waktu Indonesia Tengah)
+ # 8:00 CST China
+-# 8:00 PST PDT* Philippine Standard Time
++# 8:00 HKT HKST Hong Kong (HKWT* for Winter Time in late 1941)
++# 8:00 PST PDT* Philippines
+ # 8:30 KST KDT Korea when at +0830
+ # 9:00 WIT east Indonesia (Waktu Indonesia Timur)
+ # 9:00 JST JDT Japan
+ # 9:00 KST KDT Korea when at +09
+-# 9:30 ACST Australian Central Standard Time
+-# *I invented the abbreviation PDT; see "Philippines" below.
++# *I invented the abbreviations HKWT and PDT; see below.
+ # Otherwise, these tables typically use numeric abbreviations like +03
+ # and +0330 for integer hour and minute UT offsets. Although earlier
+ # editions invented alphabetic time zone abbreviations for every
+@@ -653,6 +653,15 @@
+ # * 1941-09-30, Hong Kong Daily Press, Winter Time Warning.
+ # https://i.imgur.com/dge4kFJ.png
+
++# From Paul Eggert (2019-07-11):
++# "Hong Kong winter time" is considered to be daylight saving.
++# "Hong Kong had adopted daylight saving on June 15 as a wartime measure,
++# clocks moving forward one hour until October 1, when they would be put back
++# by just half an hour for 'Hong Kong Winter time', so that daylight saving
++# operated year round." -- Low Z. The longest day: when wartime Hong Kong
++# introduced daylight saving. South China Morning Post. 2019-06-28.
++# https://www.scmp.com/magazines/post-magazine/short-reads/article/3016281/longest-day-when-wartime-hong-kong-introduced
++
+ # From P Chan (2018-12-31):
+ # * According to the Hong Kong Daylight-Saving Regulations, 1941, the
+ # 1941 spring-forward transition was at 03:00.
+@@ -754,7 +763,7 @@
+ Zone Asia/Hong_Kong 7:36:42 - LMT 1904 Oct 30 0:36:42
+ 8:00 - HKT 1941 Jun 15 3:00
+ 8:00 1:00 HKST 1941 Oct 1 4:00
+- 8:30 - HKT 1941 Dec 25
++ 8:00 0:30 HKWT 1941 Dec 25
+ 9:00 - JST 1945 Nov 18 2:00
+ 8:00 HK HK%sT
+
+@@ -2419,7 +2428,7 @@
+ Zone Asia/Seoul 8:27:52 - LMT 1908 Apr 1
+ 8:30 - KST 1912 Jan 1
+ 9:00 - JST 1945 Sep 8
+- 9:00 - KST 1954 Mar 21
++ 9:00 ROK K%sT 1954 Mar 21
+ 8:30 ROK K%sT 1961 Aug 10
+ 9:00 ROK K%sT
+ Zone Asia/Pyongyang 8:23:00 - LMT 1908 Apr 1
+@@ -3604,7 +3613,7 @@
+ # and in South Vietnam in particular (after 1954):
+ # To 07:00 on 1911-05-01.
+ # To 08:00 on 1942-12-31 at 23:00.
+-# To 09:00 in 1945-03-14 at 23:00.
++# To 09:00 on 1945-03-14 at 23:00.
+ # To 07:00 on 1945-09-02 in Vietnam.
+ # To 08:00 on 1947-04-01 in French-controlled Indochina.
+ # To 07:00 on 1955-07-01 in South Vietnam.
+--- contrib/tzdata/australasia.orig
++++ contrib/tzdata/australasia
+@@ -367,13 +367,18 @@
+ # From Raymond Kumar (2018-07-13):
+ # http://www.fijitimes.com/government-approves-2018-daylight-saving/
+ # ... The daylight saving period will end at 3am on Sunday January 13, 2019.
+-#
+-# From Paul Eggert (2018-07-15):
+-# For now, guess DST from 02:00 the first Sunday in November to 03:00
+-# the first Sunday on or after January 13. January transitions reportedly
++
++# From Paul Eggert (2019-08-06):
++# Today Raymond Kumar reported the Government of Fiji Gazette Supplement No. 27
++# (2019-08-02) said that Fiji observes DST "commencing at 2.00 am on
++# Sunday, 10 November 2019 and ending at 3.00 am on Sunday, 12 January 2020."
++# For now, guess DST from 02:00 the second Sunday in November to 03:00
++# the first Sunday on or after January 12. January transitions reportedly
+ # depend on when school terms start. Although the guess is ad hoc, it matches
+-# transitions since late 2014 and seems more likely to match future
+-# practice than guessing no DST.
++# transitions planned this year and seems more likely to match future practice
++# than guessing no DST.
++# From Michael Deckers (2019-08-06):
++# https://www.laws.gov.fj/LawsAsMade/downloadfile/848
+
+ # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+ Rule Fiji 1998 1999 - Nov Sun>=1 2:00 1:00 -
+@@ -384,8 +389,9 @@
+ Rule Fiji 2011 only - Mar Sun>=1 3:00 0 -
+ Rule Fiji 2012 2013 - Jan Sun>=18 3:00 0 -
+ Rule Fiji 2014 only - Jan Sun>=18 2:00 0 -
+-Rule Fiji 2014 max - Nov Sun>=1 2:00 1:00 -
+-Rule Fiji 2015 max - Jan Sun>=13 3:00 0 -
++Rule Fiji 2014 2018 - Nov Sun>=1 2:00 1:00 -
++Rule Fiji 2015 max - Jan Sun>=12 3:00 0 -
++Rule Fiji 2019 max - Nov Sun>=8 2:00 1:00 -
+ # Zone NAME STDOFF RULES FORMAT [UNTIL]
+ Zone Pacific/Fiji 11:55:44 - LMT 1915 Oct 26 # Suva
+ 12:00 Fiji +12/+13
+@@ -604,10 +610,11 @@
+ # Zone NAME STDOFF RULES FORMAT [UNTIL]
+ Zone Pacific/Norfolk 11:11:52 - LMT 1901 # Kingston
+ 11:12 - +1112 1951
+- 11:30 - +1130 1974 Oct 27 02:00
+- 11:30 1:00 +1230 1975 Mar 2 02:00
+- 11:30 - +1130 2015 Oct 4 02:00
+- 11:00 - +11
++ 11:30 - +1130 1974 Oct 27 02:00s
++ 11:30 1:00 +1230 1975 Mar 2 02:00s
++ 11:30 - +1130 2015 Oct 4 02:00s
++ 11:00 - +11 2019 Jul
++ 11:00 AN +11/+12
+
+ # Palau (Belau)
+ # Zone NAME STDOFF RULES FORMAT [UNTIL]
+@@ -1875,13 +1882,22 @@
+ # ... at 12.30 am (by legal time in New South Wales) on 4 October 2015.
+ # http://www.norfolkisland.gov.nf/nia/MediaRelease/Media%20Release%20Norfolk%20Island%20Standard%20Time%20Change.pdf
+
+-# From Paul Eggert (2015-09-23):
++# From Paul Eggert (2019-08-28):
+ # Transitions before 2015 are from timeanddate.com, which consulted
+ # the Norfolk Island Museum and the Australian Bureau of Meteorology's
+ # Norfolk Island station, and found no record of Norfolk observing DST
+ # other than in 1974/5. See:
+ # https://www.timeanddate.com/time/australia/norfolk-island.html
++# However, disagree with timeanddate about the 1975-03-02 transition;
++# timeanddate has 02:00 but 02:00s corresponds to what the NSW law said
++# (thanks to Michael Deckers).
+
++# Norfolk started observing Australian DST in spring 2019.
++# From Kyle Czech (2019-08-13):
++# https://www.legislation.gov.au/Details/F2018L01702
++# From Michael Deckers (2019-08-14):
++# https://www.legislation.gov.au/Details/F2019C00010
++
+ # Palau
+ # See commentary for Micronesia.
+
+--- contrib/tzdata/backzone.orig
++++ contrib/tzdata/backzone
+@@ -507,19 +507,35 @@
+ #Zone Asia/Panaji [not enough info to complete]
+
+ # Cambodia
+-# From Paul Eggert (2014-10-11):
+-# See Asia/Ho_Chi_Minh for the source for most of this data. Also, guess
+-# (1) Cambodia reverted to UT +07 on 1945-09-02, when Vietnam did, and
+-# (2) they also reverted to +07 on 1953-11-09, the date of independence.
+-# These guesses are probably wrong but they're better than guessing no
+-# transitions there.
++
++# From an adoptive daughter of the late Cambodian ruler Prince Sihanouk,
++# via Alois Treindl (2019-08-08):
++#
++# King Sihanouk said that, during the Japanese occupation, starting with
++# what historians refer to as "le coup de force du 9 mars 1945", Cambodia,
++# like the entire French Indochina, used Tokyo time zone. After Japan
++# surrendered, 2 September 1945, Cambodia fell under French rule again and
++# adopted Hanoi time zone again.
++#
++# However, on 7 January 1946, Sihanouk and Tioulong managed to obtain a
++# status of "internal autonomy" from the government of Charles de Gaulle.
++# Although many fields remained under the administration of the French
++# (customs, taxes, justice, defence, foreign affairs, etc.), the Cambodian
++# administration was responsible for religious matters and traditional
++# celebrations, which included our calendar and time. The time zone was GMT
++# + 7 and _no_ DST was applied.
++#
++# After Sihanouk and Tioulong achieved full independence, on 9 November 1953,
++# GMT + 7 was maintained.
++
++# From Paul Eggert (2019-08-26):
++# See Asia/Ho_Chi_Minh for the source for most of rest of this data.
++
+ Zone Asia/Phnom_Penh 6:59:40 - LMT 1906 Jul 1
+ 7:06:30 - PLMT 1911 May 1
+ 7:00 - +07 1942 Dec 31 23:00
+ 8:00 - +08 1945 Mar 14 23:00
+ 9:00 - +09 1945 Sep 2
+- 7:00 - +07 1947 Apr 1
+- 8:00 - +08 1953 Nov 9
+ 7:00 - +07
+
+ # Israel
+@@ -646,7 +662,7 @@
+
+ # Liechtenstein
+ Zone Europe/Vaduz 0:38:04 - LMT 1894 Jun
+- 1:00 - CET 1981
++ 1:00 Swiss CE%sT 1981
+ 1:00 EU CE%sT
+
+ # Croatia
+--- contrib/tzdata/europe.orig
++++ contrib/tzdata/europe
+@@ -821,11 +821,16 @@
+ # Shanks & Pottenger give 02:00, the BEV 00:00. Go with the BEV,
+ # and guess 02:00 for 1945-04-12.
+
++# From Alois Triendl (2019-07-22):
++# In 1946 the end of DST was on Monday, 7 October 1946, at 3:00 am.
++# Shanks had this right. Source: Die Weltpresse, 5. Oktober 1946, page 5.
++
+ # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+ Rule Austria 1920 only - Apr 5 2:00s 1:00 S
+ Rule Austria 1920 only - Sep 13 2:00s 0 -
+ Rule Austria 1946 only - Apr 14 2:00s 1:00 S
+-Rule Austria 1946 1948 - Oct Sun>=1 2:00s 0 -
++Rule Austria 1946 only - Oct 7 2:00s 0 -
++Rule Austria 1947 1948 - Oct Sun>=1 2:00s 0 -
+ Rule Austria 1947 only - Apr 6 2:00s 1:00 S
+ Rule Austria 1948 only - Apr 18 2:00s 1:00 S
+ Rule Austria 1980 only - Apr 6 0:00 1:00 S
+@@ -875,15 +880,35 @@
+
+ # Belgium
+ #
+-# From Paul Eggert (1997-07-02):
++# From Michael Deckers (2019-08-25):
++# The exposition in the web page
++# https://www.bestor.be/wiki/index.php/Voyager_dans_le_temps._L%E2%80%99introduction_de_la_norme_de_Greenwich_en_Belgique
++# gives several contemporary sources from which one can conclude that
++# the switch in Europe/Brussels on 1892-05-01 was from 00:17:30 to 00:00:00.
++#
++# From Paul Eggert (2019-08-28):
++# This quote helps explain the late-1914 situation:
++# In early November 1914, the Germans imposed the time zone used in central
++# Europe and forced the inhabitants to set their watches and public clocks
++# sixty minutes ahead. Many were reluctant to accept "German time" and
++# continued to use "Belgian time" among themselves. Reflecting the spirit of
++# resistance that arose in the population, a song made fun of this change....
++# The song ended:
++# Putting your clock forward
++# Will but hasten the happy hour
++# When we kick out the Boches!
++# See: Pluvinage G. Brussels on German time. Cahiers Bruxellois -
++# Brusselse Cahiers. 2014;XLVI(1E):15-38.
++# https://www.cairn.info/revue-cahiers-bruxellois-2014-1E-page-15.htm
++#
++# Entries from 1914 through 1917 are taken from "De tijd in België"
++# <https://www.astro.oma.be/GENERAL/INFO/nli001a.html>.
+ # Entries from 1918 through 1991 are taken from:
+ # Annuaire de L'Observatoire Royal de Belgique,
+ # Avenue Circulaire, 3, B-1180 BRUXELLES, CLVIIe année, 1991
+ # (Imprimerie HAYEZ, s.p.r.l., Rue Fin, 4, 1080 BRUXELLES, MCMXC),
+ # pp 8-9.
+-# LMT before 1892 was 0:17:30, according to the official journal of Belgium:
+-# Moniteur Belge, Samedi 30 Avril 1892, N.121.
+-# Thanks to Pascal Delmoitie for these references.
++# Thanks to Pascal Delmoitie for the 1918/1991 references.
+ # The 1918 rules are listed for completeness; they apply to unoccupied Belgium.
+ # Assume Brussels switched to WET in 1918 when the armistice took effect.
+ #
+@@ -928,7 +953,7 @@
+ Rule Belgium 1946 only - Oct 7 2:00s 0 -
+ # Zone NAME STDOFF RULES FORMAT [UNTIL]
+ Zone Europe/Brussels 0:17:30 - LMT 1880
+- 0:17:30 - BMT 1892 May 1 12:00 # Brussels MT
++ 0:17:30 - BMT 1892 May 1 00:17:30
+ 0:00 - WET 1914 Nov 8
+ 1:00 - CET 1916 May 1 0:00
+ 1:00 C-Eur CE%sT 1918 Nov 11 11:00u
+@@ -1627,6 +1652,13 @@
+ # advanced to sixty minutes later starting at hour two on 1944-04-02; ...
+ # Starting at hour three on the date 1944-09-17 standard time will be resumed.
+ #
++# From Alois Triendl (2019-07-02):
++# I spent 6 Euros to buy two archive copies of Il Messaggero, a Roman paper,
++# for 1 and 2 April 1944. The edition of 2 April has this note: "Tonight at 2
++# am, put forward the clock by one hour. Remember that in the night between
++# today and Monday the 'ora legale' will come in force again." That makes it
++# clear that in Rome the change was on Monday, 3 April 1944 at 2 am.
++#
+ # From Paul Eggert (2016-10-27):
+ # Go with INRiM for DST rules, except as corrected by Inglis for 1944
+ # for the Kingdom of Italy. This is consistent with Renzo Baldini.
+@@ -1774,15 +1806,10 @@
+ # From Paul Eggert (2013-09-09):
+ # Shanks & Pottenger say Vaduz is like Zurich.
+
+-# From Alois Treindl (2013-09-18):
+-# http://www.eliechtensteinensia.li/LIJ/1978/1938-1978/1941.pdf
+-# ... confirms on p. 6 that Liechtenstein followed Switzerland in 1941 and 1942.
+-# I ... translate only the last two paragraphs:
+-# ... during second world war, in the years 1941 and 1942, Liechtenstein
+-# introduced daylight saving time, adapting to Switzerland. From 1943 on
+-# central European time was in force throughout the year.
+-# From a report of the duke's government to the high council,
+-# regarding the introduction of a time law, of 31 May 1977.
++# From Alois Treindl (2019-07-04):
++# I was able to access the online archive of the Vaduz paper Vaterland ...
++# I could confirm from the paper that Liechtenstein did in fact follow
++# the same DST in 1941 and 1942 as Switzerland did.
+
+ Link Europe/Zurich Europe/Vaduz
+
+@@ -2490,6 +2517,12 @@
+ # Europe/Kaliningrad covers...
+ # 39 RU-KGD Kaliningrad Oblast
+
++# From Paul Eggert (2019-07-25):
++# Although Shanks lists 1945-01-01 as the date for transition from
++# +01/+02 to +02/+03, more likely this is a placeholder. Guess that
++# the transition occurred at 1945-04-10 00:00, which is about when
++# Königsberg surrendered to Soviet troops. (Thanks to Alois Triendl.)
++
+ # From Paul Eggert (2016-03-18):
+ # The 1989 transition is from USSR act No. 227 (1989-03-14).
+
+@@ -2506,8 +2539,8 @@
+ # Moscow on 1991-11-03, switched to Moscow-1 on 1992-01-19.
+
+ Zone Europe/Kaliningrad 1:22:00 - LMT 1893 Apr
+- 1:00 C-Eur CE%sT 1945
+- 2:00 Poland CE%sT 1946
++ 1:00 C-Eur CE%sT 1945 Apr 10
++ 2:00 Poland EE%sT 1946 Apr 7
+ 3:00 Russia MSK/MSD 1989 Mar 26 2:00s
+ 2:00 Russia EE%sT 2011 Mar 27 2:00s
+ 3:00 - +03 2014 Oct 26 2:00s
+@@ -3650,20 +3683,75 @@
+
+ # Turkey
+
++# From Alois Treindl (2019-08-12):
++# http://www.astrolojidergisi.com/yazsaati.htm has researched the time zone
++# history of Turkey, based on newspaper archives and official documents.
++# From Paul Eggert (2019-08-28):
++# That source (Oya Vulaş, "Türkiye'de Yaz Saati Uygulamaları")
++# is used for 1940/1972, where it seems more reliable than our other
++# sources.
++
++# From Kıvanç Yazan (2019-08-12):
++# http://www.resmigazete.gov.tr/arsiv/14539.pdf#page=24
++# 1973-06-03 01:00 -> 02:00, 1973-11-04 02:00 -> 01:00
++#
++# http://www.resmigazete.gov.tr/arsiv/14829.pdf#page=1
++# 1974-03-31 02:00 -> 03:00, 1974-11-03 02:00 -> 01:00
++#
++# http://www.resmigazete.gov.tr/arsiv/15161.pdf#page=1
++# 1975-03-22 02:00 -> 03:00, 1975-11-02 02:00 -> 01:00
++#
++# http://www.resmigazete.gov.tr/arsiv/15535_1.pdf#page=1
++# 1976-03-21 02:00 -> 03:00, 1976-10-31 02:00 -> 01:00
++#
++# http://www.resmigazete.gov.tr/arsiv/15778.pdf#page=5
++# 1977-04-03 02:00 -> 03:00, 1977-10-16 02:00 -> 01:00,
++# 1978-04-02 02:00 -> 03:00 (not applied, see below)
++# 1978-10-15 02:00 -> 01:00 (not applied, see below)
++# 1979-04-01 02:00 -> 03:00 (not applied, see below)
++# 1979-10-14 02:00 -> 01:00 (not applied, see below)
++#
++# http://www.resmigazete.gov.tr/arsiv/16245.pdf#page=17
++# This cancels the previous decision, and repeats it only for 1978.
++# 1978-04-02 02:00 -> 03:00, 1978-10-15 02:00 -> 01:00
++# (not applied due to standard TZ change below)
++#
++# http://www.resmigazete.gov.tr/arsiv/16331.pdf#page=3
++# This decision changes the default longitude for Turkish time zone from 30
++# degrees East to 45 degrees East. This means a standard TZ change, from +2
++# to +3. This is published & applied on 1978-06-29. At that time, Turkey was
++# already on summer time (already on 45E). Hence, this new law just meant an
++# "continuous summer time". Note that this was reversed in a few years.
++#
++# http://www.resmigazete.gov.tr/arsiv/18119_1.pdf#page=1
++# 1983-07-31 02:00 -> 03:00 (note that this jumps TZ to +4)
++# 1983-10-02 02:00 -> 01:00 (back to +3)
++#
++# http://www.resmigazete.gov.tr/arsiv/18561.pdf (page 1 and 34)
++# At this time, Turkey is still on +3 with no spring-forward on early
++# 1984. This decision is published on 10/31/1984. Page 1 declares
++# the decision of reverting the "default longitude change". So the
++# standard time should go back to +3 (30E). And page 34 explains when
++# that will happen: 1984-11-01 02:00 -> 01:00. You can think of this
++# as "end of continuous summer time, change of standard time zone".
++#
++# http://www.resmigazete.gov.tr/arsiv/18713.pdf#page=1
++# 1985-04-20 01:00 -> 02:00, 1985-09-28 02:00 -> 01:00
++
+ # From Kıvanç Yazan (2016-09-25):
+ # 1) For 1986-2006, DST started at 01:00 local and ended at 02:00 local, with
+ # no exceptions.
+ # 2) 1994's lastSun was overridden with Mar 20 ...
+ # Here are official papers:
+-# http://www.resmigazete.gov.tr/arsiv/19032.pdf - page 2 for 1986
+-# http://www.resmigazete.gov.tr/arsiv/19400.pdf - page 4 for 1987
+-# http://www.resmigazete.gov.tr/arsiv/19752.pdf - page 15 for 1988
+-# http://www.resmigazete.gov.tr/arsiv/20102.pdf - page 6 for 1989
+-# http://www.resmigazete.gov.tr/arsiv/20464.pdf - page 1 for 1990 - 1992
+-# http://www.resmigazete.gov.tr/arsiv/21531.pdf - page 15 for 1993 - 1995
+-# http://www.resmigazete.gov.tr/arsiv/21879.pdf - page 1 for overriding 1994
+-# http://www.resmigazete.gov.tr/arsiv/22588.pdf - page 1 for 1996, 1997
+-# http://www.resmigazete.gov.tr/arsiv/23286.pdf - page 10 for 1998 - 2000
++# http://www.resmigazete.gov.tr/arsiv/19032.pdf#page=2 for 1986
++# http://www.resmigazete.gov.tr/arsiv/19400.pdf#page=4 for 1987
++# http://www.resmigazete.gov.tr/arsiv/19752.pdf#page=15 for 1988
++# http://www.resmigazete.gov.tr/arsiv/20102.pdf#page=6 for 1989
++# http://www.resmigazete.gov.tr/arsiv/20464.pdf#page=1 for 1990 - 1992
++# http://www.resmigazete.gov.tr/arsiv/21531.pdf#page=15 for 1993 - 1995
++# http://www.resmigazete.gov.tr/arsiv/21879.pdf#page=1 for overriding 1994
++# http://www.resmigazete.gov.tr/arsiv/22588.pdf#page=1 for 1996, 1997
++# http://www.resmigazete.gov.tr/arsiv/23286.pdf#page=10 for 1998 - 2000
+ # http://www.resmigazete.gov.tr/eskiler/2001/03/20010324.htm#2 - for 2001
+ # http://www.resmigazete.gov.tr/eskiler/2002/03/20020316.htm#2 - for 2002-2006
+ # From Paul Eggert (2016-09-25):
+@@ -3747,46 +3835,36 @@
+ Rule Turkey 1924 only - May 13 0:00 1:00 S
+ Rule Turkey 1924 1925 - Oct 1 0:00 0 -
+ Rule Turkey 1925 only - May 1 0:00 1:00 S
+-Rule Turkey 1940 only - Jun 30 0:00 1:00 S
+-Rule Turkey 1940 only - Oct 5 0:00 0 -
++Rule Turkey 1940 only - Jul 1 0:00 1:00 S
++Rule Turkey 1940 only - Oct 6 0:00 0 -
+ Rule Turkey 1940 only - Dec 1 0:00 1:00 S
+ Rule Turkey 1941 only - Sep 21 0:00 0 -
+ Rule Turkey 1942 only - Apr 1 0:00 1:00 S
+-# Whitman omits the next two transition and gives 1945 Oct 1;
+-# go with Shanks & Pottenger.
+-Rule Turkey 1942 only - Nov 1 0:00 0 -
+-Rule Turkey 1945 only - Apr 2 0:00 1:00 S
+ Rule Turkey 1945 only - Oct 8 0:00 0 -
+ Rule Turkey 1946 only - Jun 1 0:00 1:00 S
+ Rule Turkey 1946 only - Oct 1 0:00 0 -
+ Rule Turkey 1947 1948 - Apr Sun>=16 0:00 1:00 S
+-Rule Turkey 1947 1950 - Oct Sun>=2 0:00 0 -
++Rule Turkey 1947 1951 - Oct Sun>=2 0:00 0 -
+ Rule Turkey 1949 only - Apr 10 0:00 1:00 S
+-Rule Turkey 1950 only - Apr 19 0:00 1:00 S
++Rule Turkey 1950 only - Apr 16 0:00 1:00 S
+ Rule Turkey 1951 only - Apr 22 0:00 1:00 S
+-Rule Turkey 1951 only - Oct 8 0:00 0 -
++# DST for 15 months; unusual but we'll let it pass.
+ Rule Turkey 1962 only - Jul 15 0:00 1:00 S
+-Rule Turkey 1962 only - Oct 8 0:00 0 -
++Rule Turkey 1963 only - Oct 30 0:00 0 -
+ Rule Turkey 1964 only - May 15 0:00 1:00 S
+ Rule Turkey 1964 only - Oct 1 0:00 0 -
+-Rule Turkey 1970 1972 - May Sun>=2 0:00 1:00 S
+-Rule Turkey 1970 1972 - Oct Sun>=2 0:00 0 -
+ Rule Turkey 1973 only - Jun 3 1:00 1:00 S
+-Rule Turkey 1973 only - Nov 4 3:00 0 -
++Rule Turkey 1973 1976 - Oct Sun>=31 2:00 0 -
+ Rule Turkey 1974 only - Mar 31 2:00 1:00 S
+-Rule Turkey 1974 only - Nov 3 5:00 0 -
+-Rule Turkey 1975 only - Mar 30 0:00 1:00 S
+-Rule Turkey 1975 1976 - Oct lastSun 0:00 0 -
+-Rule Turkey 1976 only - Jun 1 0:00 1:00 S
+-Rule Turkey 1977 1978 - Apr Sun>=1 0:00 1:00 S
+-Rule Turkey 1977 only - Oct 16 0:00 0 -
+-Rule Turkey 1979 1980 - Apr Sun>=1 3:00 1:00 S
+-Rule Turkey 1979 1982 - Oct Mon>=11 0:00 0 -
+-Rule Turkey 1981 1982 - Mar lastSun 3:00 1:00 S
+-Rule Turkey 1983 only - Jul 31 0:00 1:00 S
+-Rule Turkey 1983 only - Oct 2 0:00 0 -
+-Rule Turkey 1985 only - Apr 20 0:00 1:00 S
+-Rule Turkey 1985 only - Sep 28 0:00 0 -
++Rule Turkey 1975 only - Mar 22 2:00 1:00 S
++Rule Turkey 1976 only - Mar 21 2:00 1:00 S
++Rule Turkey 1977 1978 - Apr Sun>=1 2:00 1:00 S
++Rule Turkey 1977 1978 - Oct Sun>=15 2:00 0 -
++Rule Turkey 1978 only - Jun 29 0:00 0 -
++Rule Turkey 1983 only - Jul 31 2:00 1:00 S
++Rule Turkey 1983 only - Oct 2 2:00 0 -
++Rule Turkey 1985 only - Apr 20 1:00s 1:00 S
++Rule Turkey 1985 only - Sep 28 1:00s 0 -
+ Rule Turkey 1986 1993 - Mar lastSun 1:00s 1:00 S
+ Rule Turkey 1986 1995 - Sep lastSun 1:00s 0 -
+ Rule Turkey 1994 only - Mar 20 1:00s 1:00 S
+@@ -3795,8 +3873,8 @@
+ # Zone NAME STDOFF RULES FORMAT [UNTIL]
+ Zone Europe/Istanbul 1:55:52 - LMT 1880
+ 1:56:56 - IMT 1910 Oct # Istanbul Mean Time?
+- 2:00 Turkey EE%sT 1978 Oct 15
+- 3:00 Turkey +03/+04 1985 Apr 20
++ 2:00 Turkey EE%sT 1978 Jun 29
++ 3:00 Turkey +03/+04 1984 Nov 1 2:00
+ 2:00 Turkey EE%sT 2007
+ 2:00 EU EE%sT 2011 Mar 27 1:00u
+ 2:00 - EET 2011 Mar 28 1:00u
+--- contrib/tzdata/leap-seconds.list.orig
++++ contrib/tzdata/leap-seconds.list
+@@ -204,10 +204,10 @@
+ # current -- the update time stamp, the data and the name of the file
+ # will not change.
+ #
+-# Updated through IERS Bulletin C57
+-# File expires on: 28 December 2019
++# Updated through IERS Bulletin C58
++# File expires on: 28 June 2020
+ #
+-#@ 3786480000
++#@ 3802291200
+ #
+ 2272060800 10 # 1 Jan 1972
+ 2287785600 11 # 1 Jul 1972
+@@ -252,4 +252,4 @@
+ # the hash line is also ignored in the
+ # computation.
+ #
+-#h 83c68138 d3650221 07dbbbcd 11fcc859 ced1106a
++#h f28827d2 f263b6c3 ec0f19eb a3e0dbf0 97f3fa30
+--- contrib/tzdata/leapseconds.orig
++++ contrib/tzdata/leapseconds
+@@ -3,17 +3,21 @@
+ # This file is in the public domain.
+
+ # This file is generated automatically from the data in the public-domain
+-# leap-seconds.list file, which can be copied from
++# NIST format leap-seconds.list file, which can be copied from
+ # <ftp://ftp.nist.gov/pub/time/leap-seconds.list>
+-# or <ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.list>
+-# or <ftp://tycho.usno.navy.mil/pub/ntp/leap-seconds.list>.
++# or <ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.list>.
+ # For more about leap-seconds.list, please see
+ # The NTP Timescale and Leap Seconds
+ # <https://www.eecis.udel.edu/~mills/leap.html>.
+
+-# The International Earth Rotation and Reference Systems Service
++# The rules for leap seconds are specified in Annex 1 (Time scales) of:
++# Standard-frequency and time-signal emissions.
++# International Telecommunication Union - Radiocommunication Sector
++# (ITU-R) Recommendation TF.460-6 (02/2002)
++# <https://www.itu.int/rec/R-REC-TF.460-6-200202-I/>.
++# The International Earth Rotation and Reference Systems Service (IERS)
+ # periodically uses leap seconds to keep UTC to within 0.9 s of UT1
+-# (which measures the true angular orientation of the earth in space)
++# (a proxy for Earth's angle in space as measured by astronomers)
+ # and publishes leap second data in a copyrighted file
+ # <https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second.dat>.
+ # See: Levine J. Coordinated Universal Time and the leap second.
+@@ -20,19 +24,18 @@
+ # URSI Radio Sci Bull. 2016;89(4):30-6. doi:10.23919/URSIRSB.2016.7909995
+ # <https://ieeexplore.ieee.org/document/7909995>.
+
+-# There were no leap seconds before 1972, because the official mechanism
+-# accounting for the discrepancy between atomic time and the earth's rotation
+-# did not exist. The first ("1 Jan 1972") data line in leap-seconds.list
++# There were no leap seconds before 1972, as no official mechanism
++# accounted for the discrepancy between atomic time (TAI) and the earth's
++# rotation. The first ("1 Jan 1972") data line in leap-seconds.list
+ # does not denote a leap second; it denotes the start of the current definition
+ # of UTC.
+
+-# The correction (+ or -) is made at the given time, so lines
+-# will typically look like:
+-# Leap YEAR MON DAY 23:59:60 + R/S
+-# or
+-# Leap YEAR MON DAY 23:59:59 - R/S
+-
+-# If the leap second is Rolling (R) the given time is local time (unused here).
++# All leap-seconds are Stationary (S) at the given UTC time.
++# The correction (+ or -) is made at the given time, so in the unlikely
++# event of a negative leap second, a line would look like this:
++# Leap YEAR MON DAY 23:59:59 - S
++# Typical lines look like this:
++# Leap YEAR MON DAY 23:59:60 + S
+ Leap 1972 Jun 30 23:59:60 + S
+ Leap 1972 Dec 31 23:59:60 + S
+ Leap 1973 Dec 31 23:59:60 + S
+@@ -62,8 +65,8 @@
+ Leap 2016 Dec 31 23:59:60 + S
+
+ # POSIX timestamps for the data in this file:
+-#updated 1467936000
+-#expires 1577491200
++#updated 1467936000 (2016-07-08 00:00:00 UTC)
++#expires 1593302400 (2020-06-28 00:00:00 UTC)
+
+-# Updated through IERS Bulletin C57
+-# File expires on: 28 December 2019
++# Updated through IERS Bulletin C58
++# File expires on: 28 June 2020
+--- contrib/tzdata/leapseconds.awk.orig
++++ contrib/tzdata/leapseconds.awk
+@@ -1,7 +1,20 @@
+-# Generate the 'leapseconds' file from 'leap-seconds.list'.
++# Generate zic format 'leapseconds' from NIST format 'leap-seconds.list'.
+
+ # This file is in the public domain.
+
++# This program uses awk arithmetic. POSIX requires awk to support
++# exact integer arithmetic only through 10**10, which means for NTP
++# timestamps this program works only to the year 2216, which is the
++# year 1900 plus 10**10 seconds. However, in practice
++# POSIX-conforming awk implementations invariably use IEEE-754 double
++# and so support exact integers through 2**53. By the year 2216,
++# POSIX will almost surely require at least 2**53 for awk, so for NTP
++# timestamps this program should be good until the year 285,428,681
++# (the year 1900 plus 2**53 seconds). By then leap seconds will be
++# long obsolete, as the Earth will likely slow down so much that
++# there will be more than 25 hours per day and so some other scheme
++# will be needed.
++
+ BEGIN {
+ print "# Allowance for leap seconds added to each time zone file."
+ print ""
+@@ -8,17 +21,21 @@
+ print "# This file is in the public domain."
+ print ""
+ print "# This file is generated automatically from the data in the public-domain"
+- print "# leap-seconds.list file, which can be copied from"
++ print "# NIST format leap-seconds.list file, which can be copied from"
+ print "# <ftp://ftp.nist.gov/pub/time/leap-seconds.list>"
+- print "# or <ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.list>"
+- print "# or <ftp://tycho.usno.navy.mil/pub/ntp/leap-seconds.list>."
++ print "# or <ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.list>."
+ print "# For more about leap-seconds.list, please see"
+ print "# The NTP Timescale and Leap Seconds"
+ print "# <https://www.eecis.udel.edu/~mills/leap.html>."
+ print ""
+- print "# The International Earth Rotation and Reference Systems Service"
++ print "# The rules for leap seconds are specified in Annex 1 (Time scales) of:"
++ print "# Standard-frequency and time-signal emissions."
++ print "# International Telecommunication Union - Radiocommunication Sector"
++ print "# (ITU-R) Recommendation TF.460-6 (02/2002)"
++ print "# <https://www.itu.int/rec/R-REC-TF.460-6-200202-I/>."
++ print "# The International Earth Rotation and Reference Systems Service (IERS)"
+ print "# periodically uses leap seconds to keep UTC to within 0.9 s of UT1"
+- print "# (which measures the true angular orientation of the earth in space)"
++ print "# (a proxy for Earth's angle in space as measured by astronomers)"
+ print "# and publishes leap second data in a copyrighted file"
+ print "# <https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second.dat>."
+ print "# See: Levine J. Coordinated Universal Time and the leap second."
+@@ -25,19 +42,18 @@
+ print "# URSI Radio Sci Bull. 2016;89(4):30-6. doi:10.23919/URSIRSB.2016.7909995"
+ print "# <https://ieeexplore.ieee.org/document/7909995>."
+ print ""
+- print "# There were no leap seconds before 1972, because the official mechanism"
+- print "# accounting for the discrepancy between atomic time and the earth's rotation"
+- print "# did not exist. The first (\"1 Jan 1972\") data line in leap-seconds.list"
++ print "# There were no leap seconds before 1972, as no official mechanism"
++ print "# accounted for the discrepancy between atomic time (TAI) and the earth's"
++ print "# rotation. The first (\"1 Jan 1972\") data line in leap-seconds.list"
+ print "# does not denote a leap second; it denotes the start of the current definition"
+- print"# of UTC."
++ print "# of UTC."
+ print ""
+- print "# The correction (+ or -) is made at the given time, so lines"
+- print "# will typically look like:"
+- print "# Leap YEAR MON DAY 23:59:60 + R/S"
+- print "# or"
+- print "# Leap YEAR MON DAY 23:59:59 - R/S"
+- print ""
+- print "# If the leap second is Rolling (R) the given time is local time (unused here)."
++ print "# All leap-seconds are Stationary (S) at the given UTC time."
++ print "# The correction (+ or -) is made at the given time, so in the unlikely"
++ print "# event of a negative leap second, a line would look like this:"
++ print "# Leap YEAR MON DAY 23:59:59 - S"
++ print "# Typical lines look like this:"
++ print "# Leap YEAR MON DAY 23:59:60 + S"
+
+ monthabbr[ 1] = "Jan"
+ monthabbr[ 2] = "Feb"
+@@ -51,15 +67,14 @@
+ monthabbr[10] = "Oct"
+ monthabbr[11] = "Nov"
+ monthabbr[12] = "Dec"
+- for (i in monthabbr) {
+- monthnum[monthabbr[i]] = i
+- monthlen[i] = 31
+- }
+- monthlen[2] = 28
+- monthlen[4] = monthlen[6] = monthlen[9] = monthlen[11] = 30
++
++ # Strip trailing CR, in case the input has CRLF form a la NIST.
++ RS = "\r?\n"
++
++ sstamp_init()
+ }
+
+-/^#\tUpdated through/ || /^#\tFile expires on:/ {
++/^#[ \t]*[Uu]pdated through/ || /^#[ \t]*[Ff]ile expires on/ {
+ last_lines = last_lines $0 "\n"
+ }
+
+@@ -66,15 +81,11 @@
+ /^#[$][ \t]/ { updated = $2 }
+ /^#[@][ \t]/ { expires = $2 }
+
+-/^#/ { next }
++/^[ \t]*#/ { next }
+
+ {
+ NTP_timestamp = $1
+ TAI_minus_UTC = $2
+- hash_mark = $3
+- one = $4
+- month = $5
+- year = $6
+ if (old_TAI_minus_UTC) {
+ if (old_TAI_minus_UTC < TAI_minus_UTC) {
+ sign = "23:59:60\t+"
+@@ -81,15 +92,9 @@
+ } else {
+ sign = "23:59:59\t-"
+ }
+- m = monthnum[month] - 1
+- if (m == 0) {
+- year--;
+- m = 12
+- }
+- month = monthabbr[m]
+- day = monthlen[m]
+- day += m == 2 && year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)
+- printf "Leap\t%s\t%s\t%s\t%s\tS\n", year, month, day, sign
++ sstamp_to_ymdhMs(NTP_timestamp - 1, ss_NTP)
++ printf "Leap\t%d\t%s\t%d\t%s\tS\n", \
++ ss_year, monthabbr[ss_month], ss_mday, sign
+ }
+ old_TAI_minus_UTC = TAI_minus_UTC
+ }
+@@ -102,7 +107,117 @@
+
+ print ""
+ print "# POSIX timestamps for the data in this file:"
+- printf "#updated %s\n", updated - epoch_minus_NTP
+- printf "#expires %s\n", expires - epoch_minus_NTP
++ sstamp_to_ymdhMs(updated, ss_NTP)
++ printf "#updated %d (%.4d-%.2d-%.2d %.2d:%.2d:%.2d UTC)\n", \
++ updated - epoch_minus_NTP, \
++ ss_year, ss_month, ss_mday, ss_hour, ss_min, ss_sec
++ sstamp_to_ymdhMs(expires, ss_NTP)
++ printf "#expires %d (%.4d-%.2d-%.2d %.2d:%.2d:%.2d UTC)\n", \
++ expires - epoch_minus_NTP, \
++ ss_year, ss_month, ss_mday, ss_hour, ss_min, ss_sec
++
+ printf "\n%s", last_lines
+ }
++
++# sstamp_to_ymdhMs - convert seconds timestamp to date and time
++#
++# Call as:
++#
++# sstamp_to_ymdhMs(sstamp, epoch_days)
++#
++# where:
++#
++# sstamp - is the seconds timestamp.
++# epoch_days - is the timestamp epoch in Gregorian days since 1600-03-01.
++# ss_NTP is appropriate for an NTP sstamp.
++#
++# Both arguments should be nonnegative integers.
++# On return, the following variables are set based on sstamp:
++#
++# ss_year - Gregorian calendar year
++# ss_month - month of the year (1-January to 12-December)
++# ss_mday - day of the month (1-31)
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-doc-all
mailing list