Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/time Merge tzcode-2021a



details:   https://anonhg.NetBSD.org/src/rev/ca93a254c342
branches:  trunk
changeset: 1019184:ca93a254c342
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Mar 01 04:42:14 2021 +0000

description:
Merge tzcode-2021a
- No comments in the changelog about the code changes.

diffstat:

 lib/libc/time/Makefile     |  64 ++++++++++++++++++++++-------
 lib/libc/time/NEWS         |  80 +++++++++++++++++++++++++++++++++++++
 lib/libc/time/theory.html  |   5 +-
 lib/libc/time/tz-art.html  |   4 +
 lib/libc/time/tz-link.html |  99 ++++++++++++++++++++++++---------------------
 lib/libc/time/version      |   2 +-
 lib/libc/time/zic.8        |  40 ++++++++++++++++--
 lib/libc/time/zic.c        |  18 ++++++--
 8 files changed, 236 insertions(+), 76 deletions(-)

diffs (truncated from 600 to 300 lines):

diff -r 3e05f054be1d -r ca93a254c342 lib/libc/time/Makefile
--- a/lib/libc/time/Makefile    Mon Mar 01 04:40:39 2021 +0000
+++ b/lib/libc/time/Makefile    Mon Mar 01 04:42:14 2021 +0000
@@ -583,11 +583,19 @@
                cp date '$(DESTDIR)$(BINDIR)/.'
                cp -f date.1 '$(DESTDIR)$(MANDIR)/man1/.'
 
+# Calculate version number from git, if available.
+# Otherwise, use $(VERSION) unless it is "unknown" and there is already
+# a 'version' file, in which case reuse the existing 'version' contents
+# and append "-dirty" if the contents do not already end in "-dirty".
 version:       $(VERSION_DEPS)
                { (type git) >/dev/null 2>&1 && \
                  V=`git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \
                                --abbrev=7 --dirty` || \
-                 V='$(VERSION)'; } && \
+                 if test '$(VERSION)' = unknown && V=`cat $@`; then \
+                   case $$V in *-dirty);; *) V=$$V-dirty;; esac; \
+                 else \
+                   V='$(VERSION)'; \
+                 fi; } && \
                printf '%s\n' "$$V" >$@.out
                mv $@.out $@
 
@@ -872,11 +880,34 @@
                LC_ALL=C sh workman.sh `expr $@ : '\(.*\)\.txt$$'` >$@.out
                mv $@.out $@
 
+# Set file timestamps deterministically if possible,
+# so that tarballs containing the timestamps are reproducible.
+#
+# '$(SET_TIMESTAMP_N) N DEST A B C ...' sets the timestamp of the
+# file DEST to the maximum of the timestamps of the files A B C ...,
+# plus N if GNU ls and touch are available.
+SET_TIMESTAMP_N = sh -c '\
+  n=$$0 dest=$$1; shift; \
+  touch -cmr `ls -t "$$@" | sed 1q` "$$dest" && \
+  if test $$n != 0 && \
+     lsout=`ls -n --time-style="+%s" "$$dest" 2>/dev/null`; then \
+    set x $$lsout && \
+    touch -cmd @`expr $$7 + $$n` "$$dest"; \
+  else :; fi'
+# If DEST depends on A B C ... in this Makefile, callers should use
+# $(SET_TIMESTAMP_DEP) DEST A B C ..., for the benefit of any
+# downstream 'make' that considers equal timestamps to be out of date.
+# POSIX allows this 'make' behavior, and HP-UX 'make' does it.
+# If all that matters is that the timestamp be reproducible
+# and plausible, use $(SET_TIMESTAMP).
+SET_TIMESTAMP = $(SET_TIMESTAMP_N) 0
+SET_TIMESTAMP_DEP = $(SET_TIMESTAMP_N) 1
+
 # Set the timestamps to those of the git repository, if available,
 # and if the files have not changed since then.
-# This uses GNU 'touch' syntax 'touch -d@N FILE',
-# where N is the number of seconds since 1970.
-# If git or GNU 'touch' is absent, don't bother to sync with git timestamps.
+# This uses GNU 'ls --time-style=+%s', which outputs the seconds count,
+# and GNU 'touch -d@N FILE', where N is the number of seconds since 1970.
+# If git or GNU is absent, don't bother to sync with git timestamps.
 # Also, set the timestamp of each prebuilt file like 'leapseconds'
 # to be the maximum of the files it depends on.
 set-timestamps.out: $(EIGHT_YARDS)
@@ -894,16 +925,16 @@
                    fi || exit; \
                  done; \
                fi
-               touch -cmr `ls -t $(LEAP_DEPS) | sed 1q` leapseconds
+               $(SET_TIMESTAMP_DEP) leapseconds $(LEAP_DEPS)
                for file in `ls $(MANTXTS) | sed 's/\.txt$$//'`; do \
-                 touch -cmr `ls -t $$file workman.sh | sed 1q` $$file.txt || \
+                 $(SET_TIMESTAMP_DEP) $$file.txt $$file workman.sh || \
                    exit; \
                done
-               touch -cmr `ls -t $(TZDATA_ZI_DEPS) | sed 1q` tzdata.zi
-               touch -cmr `ls -t $(VERSION_DEPS) | sed 1q` version
+               $(SET_TIMESTAMP_DEP) version $(VERSION_DEPS)
+               $(SET_TIMESTAMP_DEP) tzdata.zi $(TZDATA_ZI_DEPS)
                touch $@
 set-tzs-timestamp.out: $(TZS)
-               touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS)
+               $(SET_TIMESTAMP_DEP) $(TZS) $(TZS_DEPS)
                touch $@
 
 # The zics below ensure that each data file can stand on its own.
@@ -914,7 +945,10 @@
                mkdir public.dir
                ln $(VERSION_DEPS) public.dir
                cd public.dir && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL
-               for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi; do \
+               for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi \
+                   public.dir/vanguard.zi public.dir/main.zi \
+                   public.dir/rearguard.zi; \
+               do \
                  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)
@@ -981,7 +1015,7 @@
 signatures rearguard_signatures traditional_signatures: \
   version set-timestamps.out rearguard.zi
                VERSION=`cat version` && \
-               $(MAKE) VERSION="$$VERSION" $@_version
+               $(MAKE) AWK='$(AWK)' VERSION="$$VERSION" $@_version
 
 # These *_version rules are intended for use if VERSION is set by some
 # other means.  Ordinarily these rules are used only by the above
@@ -1018,12 +1052,12 @@
                for f in $(TDATA) $(PACKRATDATA); do \
                  rearf=tzdata$(VERSION)-rearguard.dir/$$f; \
                  $(AWK) -v DATAFORM=rearguard -f ziguard.awk $$f >$$rearf && \
-                 touch -cmr `ls -t ziguard.awk $$f` $$rearf || exit; \
+                 $(SET_TIMESTAMP_DEP) $$rearf ziguard.awk $$f || exit; \
                done
                sed '1s/$$/-rearguard/' \
                  <version >tzdata$(VERSION)-rearguard.dir/version
                : The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier.
-               touch -md 2020-10-12T22:53:00Z \
+               TZ=UTC0 touch -mt 202010122253.00 \
                  tzdata$(VERSION)-rearguard.dir/pacificnew
                touch -cmr version tzdata$(VERSION)-rearguard.dir/version
                LC_ALL=C && export LC_ALL && \
@@ -1037,7 +1071,7 @@
                rm -fr tzdb-$(VERSION)
                mkdir tzdb-$(VERSION)
                ln $(ENCHILADA) tzdb-$(VERSION)
-               touch -cmr `ls -t tzdb-$(VERSION)/* | sed 1q` tzdb-$(VERSION)
+               $(SET_TIMESTAMP) tzdb-$(VERSION) tzdb-$(VERSION)/*
                LC_ALL=C && export LC_ALL && \
                tar $(TARFLAGS) -cf - tzdb-$(VERSION) | lzip -9 >$@.out
                mv $@.out $@
@@ -1079,8 +1113,6 @@
 zdump.o:       version.h
 zic.o:         private.h tzfile.h version.h
 
-.KEEP_STATE:
-
 .PHONY: ALL INSTALL all
 .PHONY: check check_time_t_alternatives
 .PHONY: check_web check_zishrink
diff -r 3e05f054be1d -r ca93a254c342 lib/libc/time/NEWS
--- a/lib/libc/time/NEWS        Mon Mar 01 04:40:39 2021 +0000
+++ b/lib/libc/time/NEWS        Mon Mar 01 04:42:14 2021 +0000
@@ -1,5 +1,85 @@
 News for the tz database
 
+Release 2021a - 2021-01-24 10:54:57 -0800
+
+  Changes to future timestamps
+
+    South Sudan changes from +03 to +02 on 2021-02-01 at 00:00.
+    (Thanks to Steffen Thorsen.)
+
+
+Release 2020f - 2020-12-29 00:17:46 -0800
+
+  Change to build procedure
+
+    'make rearguard_tarballs' no longer generates a bad rearguard.zi,
+    fixing a 2020e bug.  (Problem reported by Deborah Goldsmith.)
+
+
+Release 2020e - 2020-12-22 15:14:34 -0800
+
+  Briefly:
+    Volgograd switches to Moscow time on 2020-12-27 at 02:00.
+
+  Changes to future timestamps
+
+    Volgograd changes time zone from +04 to +03 on 2020-12-27 at 02:00.
+    (Thanks to Alexander Krivenyshev and Stepan Golosunov.)
+
+  Changes to past timestamps
+
+    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
+      - Bermuda: several 1917 through 1956 transitions
+      - Belize: several 1942 through 1968 transitions
+      - Ghana: several 1915 through 1956 transitions
+      - Israel and Palestine: several 1940 through 1985 transitions
+      - Kenya and adjacent: several 1908 through 1960 transitions
+      - Nigeria and adjacent: correcting LMT in Lagos, and several 1905
+        through 1919 transitions
+      - Seychelles: the introduction of standard time in 1907, not 1906
+      - Vanuatu: DST in 1973-1974, and a corrected 1984 transition
+    (Thanks to P Chan.)
+
+    Because of the Australia change, Australia/Currie (King Island) is
+    no longer needed, as it is identical to Australia/Hobart for all
+    timestamps since 1970 and was therefore created by mistake.
+    Australia/Currie has been moved to the 'backward' file and its
+    corrected data moved to the 'backzone' file.
+
+  Changes to past time zone abbreviations and DST flags
+
+    To better match legislation in Turks and Caicos, the 2015 shift to
+    year-round observance of -04 is now modeled as AST throughout before
+    returning to Eastern Time with US DST in 2018, rather than as
+    maintaining EDT until 2015-11-01.  (Thanks to P Chan.)
+
+  Changes to documentation
+
+    The zic man page now documents zic's coalescing of transitions
+    when a zone falls back just before DST springs forward.
+
+
+Release 2020d - 2020-10-21 11:24:13 -0700
+
+  Briefly:
+    Palestine ends DST earlier than predicted, on 2020-10-24.
+
+  Changes to past and future timestamps
+
+    Palestine ends DST on 2020-10-24 at 01:00, instead of 2020-10-31
+    as previously predicted (thanks to Sharef Mustafa.)  Its
+    2019-10-26 fall-back was at 00:00, not 01:00 (thanks to Steffen
+    Thorsen.)  Its 2015-10-23 transition was at 01:00 not 00:00, and
+    its spring 2020 transition was on March 28 at 00:00, not March 27
+    (thanks to Pierre Cashon.)  This affects Asia/Gaza and
+    Asia/Hebron.  Assume future spring and fall transitions will be on
+    the Saturday preceding the last Sunday of March and October,
+    respectively.
+
+
 Release 2020c - 2020-10-16 11:15:53 -0700
 
   Briefly:
diff -r 3e05f054be1d -r ca93a254c342 lib/libc/time/theory.html
--- a/lib/libc/time/theory.html Mon Mar 01 04:40:39 2021 +0000
+++ b/lib/libc/time/theory.html Mon Mar 01 04:42:14 2021 +0000
@@ -474,8 +474,8 @@
     <p>
     <small>These abbreviations are:
       AMT Amsterdam, Asunción, Athens;
-      BMT Baghdad, Bangkok, Batavia, Bern, Bogotá, Bridgetown, Brussels,
-       Bucharest;
+      BMT Baghdad, Bangkok, Batavia, Bermuda, Bern, Bogotá, Bridgetown,
+        Brussels, Bucharest;
       CMT Calamarca, Caracas, Chisinau, Colón, Copenhagen, Córdoba;
       DMT Dublin/Dunsink;
       EMT Easter;
@@ -506,6 +506,7 @@
     <small>A few abbreviations also follow the pattern that
     <abbr>GMT</abbr>/<abbr>BST</abbr> established for time in the UK.
     They are:
+      BMT/BST for Bermuda 1890&ndash;1930,
       CMT/BST for Calamarca Mean Time and Bolivian Summer Time
        1890&ndash;1932,
       DMT/IST for Dublin/Dunsink Mean Time and Irish Summer Time
diff -r 3e05f054be1d -r ca93a254c342 lib/libc/time/tz-art.html
--- a/lib/libc/time/tz-art.html Mon Mar 01 04:40:39 2021 +0000
+++ b/lib/libc/time/tz-art.html Mon Mar 01 04:42:14 2021 +0000
@@ -22,6 +22,10 @@
 Explaining The Mysteries Of Time Zones</a>" (2017; 2:15)
 briefly says why France has more time zones than Russia.
 <li>
+"<a href="https://www.youtube.com/watch?v=yRz-Dl60Lfc";>Why Denmark is
+.17 Seconds Behind The World</a>" (2019; 6:29) explains why Denmark and
+the United Kingdom don't exactly follow their own law about civil time.
+<li>
 "About Time" (1962; 59 minutes) is part of the
 Bell Science extravaganza, with Frank Baxter, Richard Deacon, and Les Tremayne.
 Its advisor was Richard Feynman, and it was voiced by Mel Blanc.
diff -r 3e05f054be1d -r ca93a254c342 lib/libc/time/tz-link.html
--- a/lib/libc/time/tz-link.html        Mon Mar 01 04:40:39 2021 +0000
+++ b/lib/libc/time/tz-link.html        Mon Mar 01 04:42:14 2021 +0000
@@ -245,13 +245,12 @@
 <a
 href="http://userguide.icu-project.org/datetime/timezone";><abbr
 title="International Components for Unicode">ICU</abbr></a>,
-<a href="https://developer.ibm.com/javasdk/support/dst/jtzu/";><abbr>IBM</abbr></a>
-and <a
-href="https://www.oracle.com/technetwork/java/javase/tzupdater-readme-136440.html";>Oracle</a>
-Java, <a href="https://www.joda.org/joda-time/tz_update.html";>Joda-Time</a>, <a
+<a href="https://developer.ibm.com/javasdk/support/dst/jtzu/";><abbr>IBM</abbr>
+JDK</a>,
+<a href="https://www.joda.org/joda-time/tz_update.html";>Joda-Time</a>, <a
 href="https://dev.mysql.com/doc/refman/en/time-zone-support.html";>MySQL</a>,
-and <a
-href="https://nodatime.org/userguide/tzdb";>Noda Time</a> (see below).
+<a href="https://nodatime.org/userguide/tzdb";>Noda Time</a>, and <a
+href="https://www.oracle.com/java/technologies/javase/tzupdater-readme.html#usage";>OpenJDK/Oracle JDK</a>.
 </p>
 <p>Sources for the <code><abbr>tz</abbr></code> database are
 <a href="https://en.wikipedia.org/wiki/UTF-8";><abbr
@@ -353,12 +352,7 @@
 <a href="https://devguide.calconnect.org/Time-Zones/TZDS/";>TZDIST
 implementations</a> are available.
 The <a href="https://www.ietf.org/mailman/listinfo/tzdist-bis";>tzdist-bis
-mailing list</a> discussed the Internet draft <a
-id="TZDIST-Geolocate"
-href="https://tools.ietf.org/html/draft-murchison-tzdist-geolocate";>TZDIST
-Geolocate Extension</a> (now expired), which let a client determine its timezone
-from its geographic location using a <a
-href="https://tools.ietf.org/html/rfc5870";>'geo' URI</a>.</li>
+mailing list</a> discusses possible extensions.</li>
 <li>The <a href="https://tools.ietf.org/html/rfc5545";>
 Internet Calendaring and Scheduling Core Object Specification
 (iCalendar)</a> (Internet <abbr>RFC</abbr> 5445)
@@ -411,11 +405,11 @@



Home | Main Index | Thread Index | Old Index