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 2019a



details:   https://anonhg.NetBSD.org/src/rev/5cd2c2d0a4eb
branches:  trunk
changeset: 840373:5cd2c2d0a4eb
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Apr 04 18:18:31 2019 +0000

description:
merge 2019a

  Changes to code

    zic now has an -r option to limit the time range of output data.
    For example, 'zic -r @1000000000' limits the output data to
    timestamps starting 1000000000 seconds after the Epoch.
    This helps shrink output size and can be useful for applications
    not needing the full timestamp history, such as TZDIST truncation;
    see Internet RFC 8536 section 5.1.  (Inspired by a feature request
    from Christopher Wong, helped along by bug reports from Wong and
    from Tim Parenti.)

  Changes to documentation

    Mention Internet RFC 8536 (February 2019), which documents TZif.

    tz-link.html now cites tzdata-meta
    <https://tzdata-meta.timtimeonline.com/>.

diffstat:

 lib/libc/time/Makefile     |   29 +-
 lib/libc/time/NEWS         |   53 ++++-
 lib/libc/time/README       |    4 +-
 lib/libc/time/theory.html  |  107 ++++++---
 lib/libc/time/tz-art.html  |    4 +-
 lib/libc/time/tz-link.html |   19 +-
 lib/libc/time/tzfile.5     |   21 +-
 lib/libc/time/version      |    2 +-
 lib/libc/time/zic.8        |   56 ++++-
 lib/libc/time/zic.c        |  482 ++++++++++++++++++++++++++------------------
 10 files changed, 508 insertions(+), 269 deletions(-)

diffs (truncated from 1417 to 300 lines):

diff -r a4fb5d39f5ae -r 5cd2c2d0a4eb lib/libc/time/Makefile
--- a/lib/libc/time/Makefile    Thu Apr 04 17:33:47 2019 +0000
+++ b/lib/libc/time/Makefile    Thu Apr 04 18:18:31 2019 +0000
@@ -12,7 +12,10 @@
 # Email address for bug reports.
 BUGEMAIL=      tz%iana.org@localhost
 
-# Choose source data features.  To get new features right away, use:
+# DATAFORM selects the data format.
+# Available formats represent essentially the same data, albeit
+# possibly with minor discrepancies that users are not likely to notice.
+# To get new features and the best data right away, use:
 #      DATAFORM=       vanguard
 # To wait a while before using new features, to give downstream users
 # time to upgrade zic (the default), use:
@@ -33,11 +36,11 @@
 LOCALTIME=     GMT
 
 # If you want something other than Eastern United States time as a template
-# for handling POSIX-style timezone environment variables,
+# for handling ruleless POSIX-style timezone environment variables,
 # change the line below (after finding the timezone you want in the
 # one of the $(TDATA) source files, or adding it to a source file).
-# When a POSIX-style environment variable is handled, the rules in the
-# template file are used to determine "spring forward" and "fall back" days and
+# A ruleless environment setting like TZ='CST6CDT' uses the rules in the
+# template file to determine "spring forward" and "fall back" days and
 # times; the environment variable itself specifies UT offsets of standard and
 # daylight saving time.
 # Alternatively, if you discover you've got the wrong timezone, you can just
@@ -46,7 +49,6 @@
 # Use the command
 #      make zonenames
 # to get a list of the values you can use for POSIXRULES.
-# If you want POSIX compatibility, use "America/New_York".
 
 POSIXRULES=    America/New_York
 
@@ -113,8 +115,8 @@
 TIME_T_ALTERNATIVES_HEAD = int64_t
 TIME_T_ALTERNATIVES_TAIL = int32_t uint32_t uint64_t
 
-# What kind of TZif data files to generate.
-# (TZif is the binary time zone data format that zic generates.)
+# What kind of TZif data files to generate.  (TZif is the binary time
+# zone data format that zic generates; see Internet RFC 8536.)
 # If you want only POSIX time, with time values interpreted as
 # seconds since the epoch (not counting leap seconds), use
 #      REDO=           posix_only
@@ -360,6 +362,9 @@
 zic=           ./zic
 ZIC=           $(zic) $(ZFLAGS)
 
+# To shrink the size of installed TZif files,
+# append "-r @N" to omit data before N-seconds-after-the-Epoch.
+# See the zic man page for more about -r.
 ZFLAGS=
 
 # How to use zic to install TZif files.
@@ -491,7 +496,8 @@
 COMMON=                calendars CONTRIBUTING LICENSE Makefile \
                        NEWS README theory.html version
 WEB_PAGES=     tz-art.html tz-how-to.html tz-link.html
-CHECK_WEB_PAGES=check_tz-art.html check_tz-how-to.html check_tz-link.html
+CHECK_WEB_PAGES=check_theory.html check_tz-art.html \
+                       check_tz-how-to.html check_tz-link.html
 DOCS=          $(MANS) date.1 $(MANTXTS) $(WEB_PAGES)
 PRIMARY_YDATA= africa antarctica asia australasia \
                europe northamerica southamerica
@@ -804,9 +810,10 @@
                touch $@
 
 check_web:     $(CHECK_WEB_PAGES)
+check_theory.html: theory.html
 check_tz-art.html: tz-art.html
 check_tz-link.html: tz-link.html
-check_tz-art.html check_tz-link.html:
+check_theory.html check_tz-art.html check_tz-link.html:
                $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \
                    -F file=@$$(expr $@ : 'check_\(.*\)') -o $@.out && \
                  test ! -s $@.out || { cat $@.out; exit 1; }
@@ -840,11 +847,13 @@
                touch $@
 
 clean_misc:
+               rm -fr check_*.dir
                rm -f *.o *.out $(TIME_T_ALTERNATIVES) \
                  check_* core typecheck_* \
                  date tzselect version.h zdump zic yearistype libtz.a
 clean:         clean_misc
-               rm -fr *.dir *.zi tzdb-*/ $(TZS_NEW)
+               rm -fr *.dir tzdb-*/
+               rm -f *.zi $(TZS_NEW)
 
 maintainer-clean: clean
                @echo 'This command is intended for maintainers to use; it'
diff -r a4fb5d39f5ae -r 5cd2c2d0a4eb lib/libc/time/NEWS
--- a/lib/libc/time/NEWS        Thu Apr 04 17:33:47 2019 +0000
+++ b/lib/libc/time/NEWS        Thu Apr 04 18:18:31 2019 +0000
@@ -1,5 +1,53 @@
 News for the tz database
 
+Release 20198 - 2019-03-25 22:01:33 -0700
+
+  Briefly:
+    Palestine "springs forward" on 2019-03-30 instead of 2019-03-23.
+    Metlakatla "fell back" to rejoin Alaska Time on 2019-01-20 at 02:00.
+
+  Changes to past and future timestamps
+
+    Palestine will not start DST until 2019-03-30, instead of 2019-03-23 as
+    previously predicted.  Adjust our prediction by guessing that spring
+    transitions will be between 24 and 30 March, which matches recent practice
+    since 2016.  (Thanks to Even Scharning and Tim Parenti.)
+
+    Metlakatla ended its observance of Pacific standard time,
+    rejoining Alaska Time, on 2019-01-20 at 02:00.  (Thanks to Ryan
+    Stanley and Tim Parenti.)
+
+  Changes to past timestamps
+
+    Israel observed DST in 1980 (08-02/09-13) and 1984 (05-05/08-25).
+    (Thanks to Alois Treindl and Isaac Starkman.)
+
+  Changes to time zone abbreviations
+
+    Etc/UCT is now a backward-compatibility link to Etc/UTC, instead
+    of being a separate zone that generates the abbreviation "UCT",
+    which nowadays is typically a typo.  (Problem reported by Isiah
+    Meadows.)
+
+  Changes to code
+
+    zic now has an -r option to limit the time range of output data.
+    For example, 'zic -r @1000000000' limits the output data to
+    timestamps starting 1000000000 seconds after the Epoch.
+    This helps shrink output size and can be useful for applications
+    not needing the full timestamp history, such as TZDIST truncation;
+    see Internet RFC 8536 section 5.1.  (Inspired by a feature request
+    from Christopher Wong, helped along by bug reports from Wong and
+    from Tim Parenti.)
+
+  Changes to documentation
+
+    Mention Internet RFC 8536 (February 2019), which documents TZif.
+
+    tz-link.html now cites tzdata-meta
+    <https://tzdata-meta.timtimeonline.com/>.
+
+
 Release 2018i - 2018-12-30 11:05:43 -0800
 
   Briefly:
@@ -400,8 +448,9 @@
       downstream parsers do not support it.
 
     * The build procedure constructs three files vanguard.zi, main.zi,
-      and rearguard.zi, one for each format.  The files represent the
-      same data as closely as the formats allow.  These three files
+      and rearguard.zi, one for each format.  Although the files
+      represent essentially the same data, they may have minor
+      discrepancies that users are not likely to notice.  The files
       are intended for downstream data consumers and are not
       installed.  Zoneinfo parsers that do not support negative SAVE values
       should start using rearguard.zi, so that they will be unaffected
diff -r a4fb5d39f5ae -r 5cd2c2d0a4eb lib/libc/time/README
--- a/lib/libc/time/README      Thu Apr 04 17:33:47 2019 +0000
+++ b/lib/libc/time/README      Thu Apr 04 18:18:31 2019 +0000
@@ -1,7 +1,7 @@
 README for the tz distribution
 
-"What time is it?" -- Richard Deacon as The King
-"Any time you want it to be." -- Frank Baxter as The Scientist
+"Where do I set the hands of the clock?" -- Les Tremayne as The King
+"Oh that--you can set them any place you want." -- Frank Baxter as The Scientist
                                        (from the Bell System film "About Time")
 
 The Time Zone Database (called tz, tzdb or zoneinfo) contains code and
diff -r a4fb5d39f5ae -r 5cd2c2d0a4eb lib/libc/time/theory.html
--- a/lib/libc/time/theory.html Thu Apr 04 17:33:47 2019 +0000
+++ b/lib/libc/time/theory.html Thu Apr 04 18:18:31 2019 +0000
@@ -15,7 +15,7 @@
     <ul>
       <li><a href="#scope">Scope of the <code><abbr>tz</abbr></code>
          database</a></li>
-      <li><a href="#naming">Names of timezones</a></li>
+      <li><a href="#naming">Timezone identifiers</a></li>
       <li><a href="#abbreviations">Time zone abbreviations</a></li>
       <li><a href="#accuracy">Accuracy of the <code><abbr>tz</abbr></code>
          database</a></li>
@@ -107,9 +107,9 @@
 </section>
 
 <section>
-  <h2 id="naming">Names of timezones</h2>
+  <h2 id="naming">Timezone identifiers</h2>
 <p>
-Each timezone has a unique name.
+Each timezone has a name that uniquely identifies the timezone.
 Inexperienced users are not expected to select these names unaided.
 Distributors should provide documentation and/or a simple selection
 interface that explains each name via a map or via descriptive text like
@@ -142,10 +142,12 @@
   </li>
   <li>
     Be robust in the presence of political changes.
-    For example, names of countries are ordinarily not used, to avoid
+    For example, names are typically not tied to countries, to avoid
     incompatibilities when countries change their name (e.g.,
-    Zaire&rarr;Congo) or when locations change countries (e.g., Hong
+    Swaziland&rarr;Eswatini) or when locations change countries (e.g., Hong
     Kong from UK colony to China).
+    There is no requirement that every country or national
+    capital must have a timezone name.
   </li>
   <li>
     Be portable to a wide variety of implementations.
@@ -215,19 +217,18 @@
     do not need locations, since local time is not defined there.
   </li>
   <li>
-    There should typically be at least one name for each <a
-    href="https://en.wikipedia.org/wiki/ISO_3166-1";><abbr
-    title="International Organization for Standardization">ISO</abbr>
-    3166-1</a> officially assigned two-letter code for an inhabited
-    country or territory.
-  </li>
-  <li>
     If all the clocks in a timezone have agreed since 1970,
     do not bother to include more than one timezone
     even if some of the clocks disagreed before 1970.
     Otherwise these tables would become annoyingly large.
   </li>
   <li>
+    If boundaries between regions are fluid, such as during a war or
+    insurrection, do not bother to create a new timezone merely
+    because of yet another boundary change. This helps prevent table
+    bloat and simplifies maintenance.
+  </li>
+  <li>
     If a name is ambiguous, use a less ambiguous alternative;
     e.g., many cities are named San José and Georgetown, so
     prefer <code>America/Costa_Rica</code> to
@@ -299,6 +300,48 @@
 </ul>
 
 <p>
+Guidelines have evolved with time, and names following old versions of
+this guideline might not follow the current version. When guidelines
+have changed, old names continue to be supported. Guideline changes
+have included the following:
+</p>
+
+<ul>
+<li>
+Older versions of this package used a different naming scheme.
+See the file '<code>backward</code>' for most of these older names
+(e.g., '<code>US/Eastern</code>' instead of '<code>America/New_York</code>').
+The other old-fashioned names still supported are
+'<code>WET</code>', '<code>CET</code>', '<code>MET</code>', and
+'<code>EET</code>' (see the file '<code>europe</code>').
+</li>
+
+<li>
+Older versions of this package defined legacy names that are
+incompatible with the first guideline of location names, but which are
+still supported.
+These legacy names are mostly defined in the file
+'<code>etcetera</code>'.
+Also, the file '<code>backward</code>' defines the legacy names
+'<code>GMT0</code>', '<code>GMT-0</code>' and '<code>GMT+0</code>',
+and the file '<code>northamerica</code>' defines the legacy names
+'<code>EST5EDT</code>', '<code>CST6CDT</code>',
+'<code>MST7MDT</code>', and '<code>PST8PDT</code>'.
+</li>
+
+<li>
+Older versions of this guideline said that
+there should typically be at least one name for each <a
+href="https://en.wikipedia.org/wiki/ISO_3166-1";><abbr
+title="International Organization for Standardization">ISO</abbr>
+3166-1</a> officially assigned two-letter code for an inhabited
+country or territory.
+This old guideline has been dropped, as it was not needed to handle
+timestamps correctly and it increased maintenance burden.
+</li>
+</ul>
+
+<p>
 The file '<code>zone1970.tab</code>' lists geographical locations used
 to name timezones.
 It is intended to be an exhaustive list of names for geographic
@@ -312,29 +355,6 @@
 </p>
 
 <p>
-Older versions of this package used a different naming scheme,
-and these older names are still supported.
-See the file '<code>backward</code>' for most of these older names
-(e.g., '<code>US/Eastern</code>' instead of '<code>America/New_York</code>').



Home | Main Index | Thread Index | Old Index