Source-Changes-HG archive

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

[src/trunk]: src/external/public-domain/tz/dist Import tzdata2018d from ftp:/...



details:   https://anonhg.NetBSD.org/src/rev/4e630b85ad84
branches:  trunk
changeset: 321581:4e630b85ad84
user:      kre <kre%NetBSD.org@localhost>
date:      Sat Mar 24 01:45:23 2018 +0000

description:
Import tzdata2018d from ftp://ftp.iana.org/tz/releases/tzdata2018d.tar.gz

Summary of changes in tzdata2018d (2018-03-22 07:05:46 -0700):

        In 2018, Palestine starts DST on March 24 (today!), not March 31

        Casey Station in Antarctica changed from +11 to +08 on 2018-03-11
        at 04:00.

        Various adjustments to some historical conversions (several for
        Uruguay (1920 .. 1990), one fpr Enderbury and Kiritimati (1994/5),
        one for Portugal and colonies (1912) and Jamaica and Turks & Caicos
        (pre 1913)).

diffstat:

 external/public-domain/tz/dist/checktab.awk |   9 ++++
 external/public-domain/tz/dist/ziguard.awk  |  62 +++++++++++++++++++++++++++++
 external/public-domain/tz/dist/zishrink.awk |   4 +-
 external/public-domain/tz/dist/zone.tab     |   2 +-
 external/public-domain/tz/dist/zone1970.tab |   4 +-
 5 files changed, 76 insertions(+), 5 deletions(-)

diffs (155 lines):

diff -r cd52d900ed0e -r 4e630b85ad84 external/public-domain/tz/dist/checktab.awk
--- a/external/public-domain/tz/dist/checktab.awk       Sat Mar 24 01:45:22 2018 +0000
+++ b/external/public-domain/tz/dist/checktab.awk       Sat Mar 24 01:45:23 2018 +0000
@@ -126,6 +126,7 @@
        if ($1 == "Zone") {
                tz = $2
                ruleUsed[$4] = 1
+               if ($5 ~ /%/) rulePercentUsed[$4] = 1
        } else if ($1 == "Link" && zone_table == "zone.tab") {
                # Ignore Link commands if source and destination basenames
                # are identical, e.g. Europe/Istanbul versus Asia/Istanbul.
@@ -136,8 +137,10 @@
                if (src != dst) tz = $3
        } else if ($1 == "Rule") {
                ruleDefined[$2] = 1
+               if ($10 != "-") ruleLetters[$2] = 1
        } else {
                ruleUsed[$2] = 1
+               if ($3 ~ /%/) rulePercentUsed[$2] = 1
        }
        if (tz && tz ~ /\//) {
                if (!tztab[tz]) {
@@ -156,6 +159,12 @@
                        status = 1
                }
        }
+       for (tz in ruleLetters) {
+               if (!rulePercentUsed[tz]) {
+                       printf "%s: Rule contains letters never used\n", tz
+                       status = 1
+               }
+       }
        for (tz in tztab) {
                if (!zoneSeen[tz]) {
                        printf "%s:%d: no Zone table for '%s'\n", \
diff -r cd52d900ed0e -r 4e630b85ad84 external/public-domain/tz/dist/ziguard.awk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/public-domain/tz/dist/ziguard.awk        Sat Mar 24 01:45:23 2018 +0000
@@ -0,0 +1,62 @@
+# Convert tzdata source into vanguard or rearguard form.
+
+# Contributed by Paul Eggert.  This file is in the public domain.
+
+# This is not a general-purpose converter; it is designed for current tzdata.
+#
+# When converting to vanguard form, the output can use negative SAVE
+# values.
+#
+# When converting to rearguard form, the output uses only nonnegative
+# SAVE values.  The idea is for the output data to simulate the behavior
+# of the input data as best it can within the constraints of the
+# rearguard format.
+
+BEGIN {
+  dst_type["vanguard.zi"] = 1
+  dst_type["main.zi"] = 1
+  dst_type["rearguard.zi"] = 1
+
+  # The command line should set OUTFILE to the name of the output file.
+  if (!dst_type[outfile]) exit 1
+  vanguard = outfile == "vanguard.zi"
+}
+
+/^Zone/ { zone = $2 }
+
+outfile != "main.zi" {
+  in_comment = /^#/
+
+  # If this line should differ due to Ireland using negative SAVE values,
+  # uncomment the desired version and comment out the undesired one.
+  Rule_Eire = /^#?Rule[\t ]+Eire[\t ]/
+  Zone_Dublin_post_1968 \
+    = (zone == "Europe/Dublin" && /^#?[\t ]+[01]:00[\t ]/ \
+       && (!$(in_comment + 4) || 1968 < $(in_comment + 4)))
+  if (Rule_Eire || Zone_Dublin_post_1968) {
+    if ((Rule_Eire \
+        || (Zone_Dublin_post_1968 && $(in_comment + 3) == "IST/GMT"))  \
+       == vanguard) {
+      sub(/^#/, "")
+    } else if (/^[^#]/) {
+      sub(/^/, "#")
+    }
+  }
+}
+
+# If a Link line is followed by a Zone line for the same data, comment
+# out the Link line.  This can happen if backzone overrides a Link
+# with a Zone.
+/^Link/ {
+  linkline[$3] = NR
+}
+/^Zone/ {
+  sub(/^Link/, "#Link", line[linkline[$2]])
+}
+
+{ line[NR] = $0 }
+
+END {
+  for (i = 1; i <= NR; i++)
+    print line[i]
+}
diff -r cd52d900ed0e -r 4e630b85ad84 external/public-domain/tz/dist/zishrink.awk
--- a/external/public-domain/tz/dist/zishrink.awk       Sat Mar 24 01:45:22 2018 +0000
+++ b/external/public-domain/tz/dist/zishrink.awk       Sat Mar 24 01:45:23 2018 +0000
@@ -37,7 +37,7 @@
   # Remove comments, normalize spaces, and append a space to each line.
   sub(/#.*/, "", line)
   line = line " "
-  gsub(/[\f\r\t\v ]+/, " ", line)
+  gsub(/[\t ]+/, " ", line)
 
   # Abbreviate keywords.  Do not abbreviate "Link" to just "L",
   # as pre-2017c zic erroneously diagnoses "Li" as ambiguous.
@@ -148,7 +148,7 @@
   print "# This zic input file is in the public domain."
 }
 
-/^[\f\r\t\v ]*[^#\f\r\t\v ]/ {
+/^[\t ]*[^#\t ]/ {
   process_input_line($0)
 }
 
diff -r cd52d900ed0e -r 4e630b85ad84 external/public-domain/tz/dist/zone.tab
--- a/external/public-domain/tz/dist/zone.tab   Sat Mar 24 01:45:22 2018 +0000
+++ b/external/public-domain/tz/dist/zone.tab   Sat Mar 24 01:45:23 2018 +0000
@@ -429,7 +429,7 @@
 US     +643004-1652423 America/Nome    Alaska (west)
 US     +515248-1763929 America/Adak    Aleutian Islands
 US     +211825-1575130 Pacific/Honolulu        Hawaii
-UY     -3453-05611     America/Montevideo
+UY     -345433-0561245 America/Montevideo
 UZ     +3940+06648     Asia/Samarkand  Uzbekistan (west)
 UZ     +4120+06918     Asia/Tashkent   Uzbekistan (east)
 VA     +415408+0122711 Europe/Vatican
diff -r cd52d900ed0e -r 4e630b85ad84 external/public-domain/tz/dist/zone1970.tab
--- a/external/public-domain/tz/dist/zone1970.tab       Sat Mar 24 01:45:22 2018 +0000
+++ b/external/public-domain/tz/dist/zone1970.tab       Sat Mar 24 01:45:23 2018 +0000
@@ -12,7 +12,7 @@
 #     of ISO 3166 2-character country codes.  See the file 'iso3166.tab'.
 # 2.  Latitude and longitude of the zone's principal location
 #     in ISO 6709 sign-degrees-minutes-seconds format,
-#     either +-DDMM+-DDDMM or +-DDMMSS+-DDDMMSS,
+#     either ±DDMM±DDDMM or ±DDMMSS±DDDMMSS,
 #     first latitude (+ is north), then longitude (+ is east).
 # 3.  Zone name used in value of TZ environment variable.
 #     Please see the theory.html file for how zone names are chosen.
@@ -371,7 +371,7 @@
 US     +643004-1652423 America/Nome    Alaska (west)
 US     +515248-1763929 America/Adak    Aleutian Islands
 US,UM  +211825-1575130 Pacific/Honolulu        Hawaii
-UY     -3453-05611     America/Montevideo
+UY     -345433-0561245 America/Montevideo
 UZ     +3940+06648     Asia/Samarkand  Uzbekistan (west)
 UZ     +4120+06918     Asia/Tashkent   Uzbekistan (east)
 VE     +1030-06656     America/Caracas



Home | Main Index | Thread Index | Old Index