From a0b09c0230089252acf2eb0f1ba922e99f7f4a03 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 22 May 2024 13:53:45 -0700 Subject: [PROPOSED 1/2] Mark CET, CST6CDT etc. as obsolescent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These Zone names were present only for backward compatibility with UNIX System V, last released in the 1990s. Problem reported by Justin Grant in: https://mm.icann.org/pipermail/tz/2024-May/058934.html * Makefile (check_sorted): Do not check sorting of slashless backzone names like CET since they’re in a special section. (check_now): Also check for duplicate entries like CET vs Europe/Brussels. * NEWS: Mention the change. * backward (CET, CST6CDT, EST, EST5EDT, MST, MST7MDT, HST, PST8PDT): New backward-compatibility links. (EUbackw): New ruleset, copied from EU in the ‘europe’ file. (WET, MET, EET): Move here from ‘europe’, and use EUbackw. * backzone (CET, EST, EST5EDT, CST6CDT, MST, MST7MDT, PST8PDT, HST): Move here from ‘europe’ and ‘northamerica’. * checknow.awk: Don’t assume zonenow.tab in diagnostic. * europe (CET, WET, MET, EET): Move to ‘backward’ and make CET a link there. The old CET is now in ‘backzone’. * northamerica (EST, MST, HST, EST5EDT, CST6CDT, MST7MDT, PST8PDT): Move to backzone. --- Makefile | 18 ++++++++++++++---- NEWS | 11 +++++++++++ backward | 32 +++++++++++++++++++++++++++++++- backzone | 18 ++++++++++++++++++ checknow.awk | 2 +- europe | 8 -------- northamerica | 20 -------------------- 7 files changed, 75 insertions(+), 34 deletions(-) diff --git a/Makefile b/Makefile index 589449db..3f550b3f 100644 --- a/Makefile +++ b/Makefile @@ -918,7 +918,7 @@ CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; } check_sorted: backward backzone $(AWK) '/^Link/ {printf "%.5d %s\n", g, $$3} !/./ {g++}' \ backward | LC_ALL=C sort -cu - $(AWK) '/^Zone/ {print $$2}' backzone | LC_ALL=C sort -cu + $(AWK) '/^Zone.*\// {print $$2}' backzone | LC_ALL=C sort -cu touch $@ check_back: checklinks.awk $(TDATA_TO_CHECK) @@ -937,7 +937,7 @@ check_links: checklinks.awk tzdata.zi # Check timestamps from now through 28 years from now, to make sure # that zonenow.tab contains all sequences of planned timestamps, # without any duplicate sequences. In theory this might require -# 2800 years but that would take a long time to check. +# 2800+ years but that would take a long time to check. CHECK_NOW_TIMESTAMP = `./date +%s` CHECK_NOW_FUTURE_YEARS = 28 CHECK_NOW_FUTURE_SECS = $(CHECK_NOW_FUTURE_YEARS) '*' 366 '*' 24 '*' 60 '*' 60 @@ -949,10 +949,20 @@ check_now: checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab future=`expr $(CHECK_NOW_FUTURE_SECS) + $$now` && \ ./zdump -i -t $$now,$$future \ $$(find $$PWD/$@.dir/????*/ -type f) \ - >$@.dir/zdump.tab + >$@.dir/zdump-now.tab && \ + ./zdump -i -t 0,$$future \ + $$(find $$PWD/$@.dir -name Etc -prune \ + -o -type f ! -name '*.tab' -print) \ + >$@.dir/zdump-1970.tab $(AWK) \ - -v zdump_table=$@.dir/zdump.tab \ + -v zdump_table=$@.dir/zdump-now.tab \ -f checknow.awk zonenow.tab + $(AWK) \ + 'BEGIN {print "-\t-\tUTC"} /^Zone/ {print "-\t-\t" $$2}' \ + $(PRIMARY_YDATA) backward factory | \ + $(AWK) \ + -v zdump_table=$@.dir/zdump-1970.tab \ + -f checknow.awk rm -fr $@.dir touch $@ diff --git a/NEWS b/NEWS index e5db26b4..987ed6bb 100644 --- a/NEWS +++ b/NEWS @@ -3,12 +3,23 @@ News for the tz database Unreleased, experimental changes Briefly: + System V names are now obsolescent. The main data form now uses %z. The code now conforms to RFC 8536 for early timestamps. Improve historical data for Portugal and possessions. 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 if + there is an exact match since 1970, and remain Zones otherwise. + 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 diff --git a/backward b/backward index 65c711b3..0b6a8efa 100644 --- a/backward +++ b/backward @@ -1,9 +1,10 @@ -# tzdb links for backward compatibility +# Links and zones for backward compatibility # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. # This file provides links from old or merged timezone names to current ones. +# It also provides a few zone entries for old naming conventions. # Many names changed in 1993 and in 1995, and many merged names moved here # in the period from 2013 through 2022. Several of these names are # also present in the file 'backzone', which has data important only @@ -44,6 +45,8 @@ Link America/Rio_Branco Brazil/Acre #= America/Porto_Acre Link America/Noronha Brazil/DeNoronha Link America/Sao_Paulo Brazil/East Link America/Manaus Brazil/West +Link Europe/Brussels CET +Link America/Chicago CST6CDT Link America/Halifax Canada/Atlantic Link America/Winnipeg Canada/Central # This line is commented out, as the name exceeded the 14-character limit @@ -58,6 +61,8 @@ Link America/Whitehorse Canada/Yukon Link America/Santiago Chile/Continental Link Pacific/Easter Chile/EasterIsland Link America/Havana Cuba +Link America/Panama EST +Link America/New_York EST5EDT Link Africa/Cairo Egypt Link Europe/Dublin Eire # Vanguard section, for most .zi parsers. @@ -96,6 +101,8 @@ Link America/Jamaica Jamaica Link Asia/Tokyo Japan Link Pacific/Kwajalein Kwajalein Link Africa/Tripoli Libya +Link America/Phoenix MST +Link America/Denver MST7MDT Link America/Tijuana Mexico/BajaNorte Link America/Mazatlan Mexico/BajaSur Link America/Mexico_City Mexico/General @@ -314,5 +321,28 @@ Link Europe/Kyiv Europe/Kiev # Classically, Cyprus is in Asia; e.g. see Herodotus, Histories, I.72. # However, for various reasons many users expect to find it under Europe. Link Asia/Nicosia Europe/Nicosia +Link Pacific/Honolulu HST +Link America/Los_Angeles PST8PDT Link Pacific/Guadalcanal Pacific/Ponape #= Pacific/Pohnpei Link Pacific/Port_Moresby Pacific/Truk #= Pacific/Chuuk + +# These rules are stolen from the 'europe' file. +# Rule NAME FROM TO - IN ON AT SAVE LETTER/S +Rule EUbackw 1977 1980 - Apr Sun>=1 1:00u 1:00 S +Rule EUbackw 1977 only - Sep lastSun 1:00u 0 - +Rule EUbackw 1978 only - Oct 1 1:00u 0 - +Rule EUbackw 1979 1995 - Sep lastSun 1:00u 0 - +Rule EUbackw 1981 max - Mar lastSun 1:00u 1:00 S +Rule EUbackw 1996 max - Oct lastSun 1:00u 0 - + +# From Paul Eggert (2024-05-22): +# The following zones pretend that standard time extends backward +# indefinitely into the past, and so are ahistorical. +# They are present for backward compatibility with older TZDB versions. +# They are Zones (instead of being a Link like CET) +# because they are not equivalent to any current Zone since 1970. + +# Zone NAME STDOFF RULES FORMAT [UNTIL] +Zone WET 0:00 EUbackw WE%sT +Zone MET 1:00 EUbackw ME%sT +Zone EET 2:00 EUbackw EE%sT diff --git a/backzone b/backzone index f4525034..f986c137 100644 --- a/backzone +++ b/backzone @@ -1829,6 +1829,24 @@ Zone Pacific/Wake 11:06:28 - LMT 1901 Zone Pacific/Wallis 12:15:20 - LMT 1901 12:00 - +12 + +# From Paul Eggert (2024-05-22): +# The following zones pretend that standard time extends backward +# indefinitely into the past, and so are ahistorical. +# In current TZDB these entries are links to geographical locations +# that agree with the ahistorical zones since 1970. +# These are in numeric rather than alphabetic order. + +# Zone NAME STDOFF RULES FORMAT [UNTIL] +Zone HST -10:00 - HST +Zone PST8PDT -8:00 US P%sT +Zone MST -7:00 - MST +Zone MST7MDT -7:00 US M%sT +Zone CST6CDT -6:00 US C%sT +Zone EST -5:00 - EST +Zone EST5EDT -5:00 US E%sT +Zone CET 1:00 C-Eur CE%sT + # Local Variables: # coding: utf-8 # End: diff --git a/checknow.awk b/checknow.awk index 57ff3c02..f0b8ed19 100644 --- a/checknow.awk +++ b/checknow.awk @@ -45,7 +45,7 @@ END { for (zone in zone_data) { data = zone_data[zone] if (!zonenow[data]) { - printf "zonenow.tab should have one of:%s\n", zones[data] + printf "Zone table should have one of:%s\n", zones[data] zonenow[data] = zone # This suppresses duplicate diagnostics. status = 1 } diff --git a/europe b/europe index f19c4563..9ea14914 100644 --- a/europe +++ b/europe @@ -730,14 +730,6 @@ Rule Russia 1996 2010 - Oct lastSun 2:00s 0 - # Take "abolishing daylight saving time" to mean that time is now considered # to be standard. -# These are for backward compatibility with older versions. - -# Zone NAME STDOFF RULES FORMAT [UNTIL] -Zone WET 0:00 EU WE%sT -Zone CET 1:00 C-Eur CE%sT -Zone MET 1:00 C-Eur ME%sT -Zone EET 2:00 EU EE%sT - # Previous editions of this database used abbreviations like MET DST # for Central European Summer Time, but this didn't agree with common usage. diff --git a/northamerica b/northamerica index 5bf5b5f6..74b8efc4 100644 --- a/northamerica +++ b/northamerica @@ -185,26 +185,6 @@ Rule US 1987 2006 - Apr Sun>=1 2:00 1:00 D Rule US 2007 max - Mar Sun>=8 2:00 1:00 D Rule US 2007 max - Nov Sun>=1 2:00 0 S -# From Arthur David Olson, 2005-12-19 -# We generate the files specified below to guard against old files with -# obsolete information being left in the time zone binary directory. -# We limit the list to names that have appeared in previous versions of -# this time zone package. -# We do these as separate Zones rather than as Links to avoid problems if -# a particular place changes whether it observes DST. -# We put these specifications here in the northamerica file both to -# increase the chances that they'll actually get compiled and to -# avoid the need to duplicate the US rules in another file. - -# Zone NAME STDOFF RULES FORMAT [UNTIL] -Zone EST -5:00 - EST -Zone MST -7:00 - MST -Zone HST -10:00 - HST -Zone EST5EDT -5:00 US E%sT -Zone CST6CDT -6:00 US C%sT -Zone MST7MDT -7:00 US M%sT -Zone PST8PDT -8:00 US P%sT - # From U. S. Naval Observatory (1989-01-19): # USA EASTERN 5 H BEHIND UTC NEW YORK, WASHINGTON # USA EASTERN 4 H BEHIND UTC APR 3 - OCT 30 -- 2.43.0