head 1.1; access; symbols perseant-exfatfs-base-20250801:1.1 perseant-exfatfs-base-20240630:1.1 cjep_sun2x:1.1.0.10 cjep_sun2x-base:1.1 cjep_staticlib_x-base1:1.1 cjep_staticlib_x:1.1.0.8 cjep_staticlib_x-base:1.1 phil-wifi-20200421:1.1 phil-wifi-20200411:1.1 phil-wifi-20200406:1.1 pgoyette-compat-20190127:1.1 pgoyette-compat-20190118:1.1 pgoyette-compat-1226:1.1 pgoyette-compat-1126:1.1 pgoyette-compat-1020:1.1 pgoyette-compat-0930:1.1 pgoyette-compat-0906:1.1 pgoyette-compat-0728:1.1 pgoyette-compat-0625:1.1 pgoyette-compat-0521:1.1 pgoyette-compat-0502:1.1 pgoyette-compat-0422:1.1 pgoyette-compat-0415:1.1 pgoyette-compat-0407:1.1 pgoyette-compat-0330:1.1 netbsd-6-0:1.1.0.6 netbsd-6-1:1.1.0.4 netbsd-6:1.1.0.2; locks; strict; comment @# @; 1.1 date 2018.03.25.18.31.03; author martin; state dead; branches 1.1.2.1 1.1.4.1 1.1.6.1; next ; commitid lyWalat8NG40WRvA; 1.1.2.1 date 2018.03.25.18.31.03; author martin; state Exp; branches; next ; commitid lyWalat8NG40WRvA; 1.1.4.1 date 2018.03.25.18.31.03; author martin; state dead; branches; next 1.1.4.2; commitid swH5T8g4SrnAXRvA; 1.1.4.2 date 2018.03.25.18.35.29; author martin; state Exp; branches; next ; commitid swH5T8g4SrnAXRvA; 1.1.6.1 date 2018.03.25.18.31.03; author martin; state dead; branches; next 1.1.6.2; commitid n55h2ah0zRZLYRvA; 1.1.6.2 date 2018.03.25.18.38.52; author martin; state Exp; branches; next ; commitid n55h2ah0zRZLYRvA; desc @@ 1.1 log @file zishrink.awk was initially added on branch netbsd-6. @ text @@ 1.1.6.1 log @file zishrink.awk was added on branch netbsd-6-0 on 2018-03-25 18:38:52 +0000 @ text @@ 1.1.6.2 log @Pull up the following revisions, requested by kre in tickt #1539: external/public-domain/tz/dist/CONTRIBUTING up to 1.1.1.5 external/public-domain/tz/dist/Makefile up to 1.1.1.20 external/public-domain/tz/dist/NEWS up to 1.1.1.21 external/public-domain/tz/dist/README up to 1.1.1.6 external/public-domain/tz/dist/TZDATA_VERSION up to 1.11 external/public-domain/tz/dist/africa up to 1.1.1.14 external/public-domain/tz/dist/antarctica up to 1.1.1.10 external/public-domain/tz/dist/asia up to 1.1.1.19 external/public-domain/tz/dist/australasia up to 1.1.1.14 external/public-domain/tz/dist/backzone up to 1.1.1.14 external/public-domain/tz/dist/calendars up to 1.1.1.1 external/public-domain/tz/dist/checktab.awk up to 1.1.1.9 external/public-domain/tz/dist/europe up to 1.1.1.20 external/public-domain/tz/dist/leap-seconds.list up to 1.1.1.9 external/public-domain/tz/dist/leapseconds up to 1.1.1.10 external/public-domain/tz/dist/northamerica up to 1.1.1.19 external/public-domain/tz/dist/southamerica up to 1.1.1.14 external/public-domain/tz/dist/theory.html up to 1.1.1.3 external/public-domain/tz/dist/version up to 1.1.1.8 external/public-domain/tz/dist/ziguard.awk up to 1.1.1.1 external/public-domain/tz/dist/zishrink.awk up to 1.1.1.3 external/public-domain/tz/dist/zone.tab up to 1.1.1.14 external/public-domain/tz/dist/zone1970.tab up to 1.1.1.16 (with external/public-domain/tz/dist/ -> share/zoneinfo/) share/zoneinfo/Theory delete doc/3RDPARTY (patch) distrib/sets/lists/base/mi 1.1164 Update of /cvsroot/src/external/public-domain/tz/dist In directory ivanova.netbsd.org:/tmp/cvs-serv18468 Log Message: 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)). Summary of changes in tzdata2017c: Northern Cyprus switches from +03 to +02/+03 on 2017-10-29. Fiji ends DST 2018-01-14, not 2018-01-21. Namibia switches from +01/+02 to +02 on 2018-04-01. Sudan switches from +03 to +02 on 2017-11-01. Tonga likely switches from +13/+14 to +13 on 2017-11-05. Turks & Caicos switches from -04 to -05/-04 on 2018-11-04. Some corrections to (mostly ancient) historical data. Summary of changes in tzdata2018c (2018-01-22 23:00:44 -0800): Summary of changes in tzdata2018b (2018-01-17 23:24:48 -0800): Summary of changes in tzdata2018a (2018-01-12 22:29:21 -0800): 2018a and 2018b were (kind of) released, but never announced. Some "issues" were found with them that caused the relatively quick updates... The updates are from the previous version (2017c) to the current one (2018c) - that 2018a & 2018b intervened is best forgotten... (changes in 2018a that were corrected (2018b) or reverted (2018c) are not mentioned). Briefly: Sao Tome and Principe (An island nation off west coast of Equatorial Africa) switched from +00 to +01. Brazil's DST will now start on November's first Sunday. Use Debian-style installation locations, instead of 4.3BSD-style. (this does not affect NetBSD, we do not use the tzdata Makefile) Changes to past and future time stamps Sao Tome and Principe switched from +00 to +01 on 2018-01-01 at 01:00. (Thanks to Steffen Thorsen and Michael Deckers.) Changes to future time stamps Starting in 2018 southern Brazil will begin DST on November's first Sunday instead of October's third Sunday. (Thanks to Steffen Thorsen.) Changes to past time stamps Japanese DST transitions (1948-1951) were Sundays at 00:00, not Saturdays or Sundays at 02:00. (Thanks to Takayuki Nikai.) A discrepancy of 4 s in timestamps before 1931 in South Sudan has been corrected. The 'backzone' and 'zone.tab' files did not agree with the 'africa' and 'zone1970.tab' files. (Problem reported by Michael Deckers.) The abbreviation invented for Bolivia Summer Time (1931-2) is now BST instead of BOST, to be more consistent with the convention used for Latvian Summer Time (1918-9) and for British Summer Time. @ text @a0 157 # Convert tzdata source into a smaller version of itself. # Contributed by Paul Eggert. This file is in the public domain. # This is not a general-purpose converter; it is designed for current tzdata. # 'zic' should treat this script's output as if it were identical to # this script's input. # Return a new rule name. # N_RULE_NAMES keeps track of how many rule names have been generated. function gen_rule_name(alphabet, base, rule_name, n, digit) { alphabet = "" alphabet = alphabet "ABCDEFGHIJKLMNOPQRSTUVWXYZ" alphabet = alphabet "abcdefghijklmnopqrstuvwxyz" alphabet = alphabet "!$%&'()*+,./:;<=>?@@[\\]^_`{|}~" base = length(alphabet) rule_name = "" n = n_rule_names++ do { n -= rule_name && n <= base digit = n % base rule_name = substr(alphabet, digit + 1, 1) rule_name n = (n - digit) / base } while (n); return rule_name } # Process an input line and save it for later output. function process_input_line(line, field, end, i, n, startdef) { # Remove comments, normalize spaces, and append a space to each line. sub(/#.*/, "", line) line = line " " gsub(/[\t ]+/, " ", line) # Abbreviate keywords. Do not abbreviate "Link" to just "L", # as pre-2017c zic erroneously diagnoses "Li" as ambiguous. sub(/^Link /, "Li ", line) sub(/^Rule /, "R ", line) sub(/^Zone /, "Z ", line) # SystemV rules are not needed. if (line ~ /^R SystemV /) return # Replace FooAsia rules with the same rules without "Asia", as they # are duplicates. if (match(line, /[^ ]Asia /)) { if (line ~ /^R /) return line = substr(line, 1, RSTART) substr(line, RSTART + 5) } # Abbreviate times. while (match(line, /[: ]0+[0-9]/)) line = substr(line, 1, RSTART) substr(line, RSTART + RLENGTH - 1) while (match(line, /:0[^:]/)) line = substr(line, 1, RSTART - 1) substr(line, RSTART + 2) # Abbreviate weekday names. Do not abbreviate "Sun" and "Sat", as # pre-2017c zic erroneously diagnoses "Su" and "Sa" as ambiguous. while (match(line, / (last)?(Mon|Wed|Fri)[ <>]/)) { end = RSTART + RLENGTH line = substr(line, 1, end - 4) substr(line, end - 1) } while (match(line, / (last)?(Tue|Thu)[ <>]/)) { end = RSTART + RLENGTH line = substr(line, 1, end - 3) substr(line, end - 1) } # Abbreviate "max", "only" and month names. # Do not abbreviate "min", as pre-2017c zic erroneously diagnoses "mi" # as ambiguous. gsub(/ max /, " ma ", line) gsub(/ only /, " o ", line) gsub(/ Jan /, " Ja ", line) gsub(/ Feb /, " F ", line) gsub(/ Apr /, " Ap ", line) gsub(/ Aug /, " Au ", line) gsub(/ Sep /, " S ", line) gsub(/ Oct /, " O ", line) gsub(/ Nov /, " N ", line) gsub(/ Dec /, " D ", line) # Strip leading and trailing space. sub(/^ /, "", line) sub(/ $/, "", line) # Remove unnecessary trailing zero fields. sub(/ 0+$/, "", line) # Remove unnecessary trailing days-of-month "1". if (match(line, /[A-Za-z] 1$/)) line = substr(line, 1, RSTART) # Remove unnecessary trailing " Ja" (for January). sub(/ Ja$/, "", line) n = split(line, field) # Abbreviate rule names. i = field[1] == "Z" ? 4 : field[1] == "Li" ? 0 : 2 if (i && field[i] ~ /^[^-+0-9]/) { if (!rule[field[i]]) rule[field[i]] = gen_rule_name() field[i] = rule[field[i]] } # If this zone supersedes an earlier one, delete the earlier one # from the saved output lines. startdef = "" if (field[1] == "Z") zonename = startdef = field[2] else if (field[1] == "Li") zonename = startdef = field[3] else if (field[1] == "R") zonename = "" if (startdef) { i = zonedef[startdef] if (i) { do output_line[i - 1] = "" while (output_line[i++] ~ /^[-+0-9]/); } } zonedef[zonename] = nout + 1 # Save the line for later output. line = field[1] for (i = 2; i <= n; i++) line = line " " field[i] output_line[nout++] = line } function output_saved_lines(i) { for (i = 0; i < nout; i++) if (output_line[i]) print output_line[i] } BEGIN { print "# version", version print "# This zic input file is in the public domain." } /^[\t ]*[^#\t ]/ { process_input_line($0) } END { output_saved_lines() } @ 1.1.4.1 log @file zishrink.awk was added on branch netbsd-6-1 on 2018-03-25 18:35:29 +0000 @ text @@ 1.1.4.2 log @Pull up the following revisions, requested by kre in tickt #1539: external/public-domain/tz/dist/CONTRIBUTING up to 1.1.1.5 external/public-domain/tz/dist/Makefile up to 1.1.1.20 external/public-domain/tz/dist/NEWS up to 1.1.1.21 external/public-domain/tz/dist/README up to 1.1.1.6 external/public-domain/tz/dist/TZDATA_VERSION up to 1.11 external/public-domain/tz/dist/africa up to 1.1.1.14 external/public-domain/tz/dist/antarctica up to 1.1.1.10 external/public-domain/tz/dist/asia up to 1.1.1.19 external/public-domain/tz/dist/australasia up to 1.1.1.14 external/public-domain/tz/dist/backzone up to 1.1.1.14 external/public-domain/tz/dist/calendars up to 1.1.1.1 external/public-domain/tz/dist/checktab.awk up to 1.1.1.9 external/public-domain/tz/dist/europe up to 1.1.1.20 external/public-domain/tz/dist/leap-seconds.list up to 1.1.1.9 external/public-domain/tz/dist/leapseconds up to 1.1.1.10 external/public-domain/tz/dist/northamerica up to 1.1.1.19 external/public-domain/tz/dist/southamerica up to 1.1.1.14 external/public-domain/tz/dist/theory.html up to 1.1.1.3 external/public-domain/tz/dist/version up to 1.1.1.8 external/public-domain/tz/dist/ziguard.awk up to 1.1.1.1 external/public-domain/tz/dist/zishrink.awk up to 1.1.1.3 external/public-domain/tz/dist/zone.tab up to 1.1.1.14 external/public-domain/tz/dist/zone1970.tab up to 1.1.1.16 (with external/public-domain/tz/dist/ -> share/zoneinfo/) share/zoneinfo/Theory delete doc/3RDPARTY (patch) distrib/sets/lists/base/mi 1.1164 Update of /cvsroot/src/external/public-domain/tz/dist In directory ivanova.netbsd.org:/tmp/cvs-serv18468 Log Message: 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)). Summary of changes in tzdata2017c: Northern Cyprus switches from +03 to +02/+03 on 2017-10-29. Fiji ends DST 2018-01-14, not 2018-01-21. Namibia switches from +01/+02 to +02 on 2018-04-01. Sudan switches from +03 to +02 on 2017-11-01. Tonga likely switches from +13/+14 to +13 on 2017-11-05. Turks & Caicos switches from -04 to -05/-04 on 2018-11-04. Some corrections to (mostly ancient) historical data. Summary of changes in tzdata2018c (2018-01-22 23:00:44 -0800): Summary of changes in tzdata2018b (2018-01-17 23:24:48 -0800): Summary of changes in tzdata2018a (2018-01-12 22:29:21 -0800): 2018a and 2018b were (kind of) released, but never announced. Some "issues" were found with them that caused the relatively quick updates... The updates are from the previous version (2017c) to the current one (2018c) - that 2018a & 2018b intervened is best forgotten... (changes in 2018a that were corrected (2018b) or reverted (2018c) are not mentioned). Briefly: Sao Tome and Principe (An island nation off west coast of Equatorial Africa) switched from +00 to +01. Brazil's DST will now start on November's first Sunday. Use Debian-style installation locations, instead of 4.3BSD-style. (this does not affect NetBSD, we do not use the tzdata Makefile) Changes to past and future time stamps Sao Tome and Principe switched from +00 to +01 on 2018-01-01 at 01:00. (Thanks to Steffen Thorsen and Michael Deckers.) Changes to future time stamps Starting in 2018 southern Brazil will begin DST on November's first Sunday instead of October's third Sunday. (Thanks to Steffen Thorsen.) Changes to past time stamps Japanese DST transitions (1948-1951) were Sundays at 00:00, not Saturdays or Sundays at 02:00. (Thanks to Takayuki Nikai.) A discrepancy of 4 s in timestamps before 1931 in South Sudan has been corrected. The 'backzone' and 'zone.tab' files did not agree with the 'africa' and 'zone1970.tab' files. (Problem reported by Michael Deckers.) The abbreviation invented for Bolivia Summer Time (1931-2) is now BST instead of BOST, to be more consistent with the convention used for Latvian Summer Time (1918-9) and for British Summer Time. @ text @a0 157 # Convert tzdata source into a smaller version of itself. # Contributed by Paul Eggert. This file is in the public domain. # This is not a general-purpose converter; it is designed for current tzdata. # 'zic' should treat this script's output as if it were identical to # this script's input. # Return a new rule name. # N_RULE_NAMES keeps track of how many rule names have been generated. function gen_rule_name(alphabet, base, rule_name, n, digit) { alphabet = "" alphabet = alphabet "ABCDEFGHIJKLMNOPQRSTUVWXYZ" alphabet = alphabet "abcdefghijklmnopqrstuvwxyz" alphabet = alphabet "!$%&'()*+,./:;<=>?@@[\\]^_`{|}~" base = length(alphabet) rule_name = "" n = n_rule_names++ do { n -= rule_name && n <= base digit = n % base rule_name = substr(alphabet, digit + 1, 1) rule_name n = (n - digit) / base } while (n); return rule_name } # Process an input line and save it for later output. function process_input_line(line, field, end, i, n, startdef) { # Remove comments, normalize spaces, and append a space to each line. sub(/#.*/, "", line) line = line " " gsub(/[\t ]+/, " ", line) # Abbreviate keywords. Do not abbreviate "Link" to just "L", # as pre-2017c zic erroneously diagnoses "Li" as ambiguous. sub(/^Link /, "Li ", line) sub(/^Rule /, "R ", line) sub(/^Zone /, "Z ", line) # SystemV rules are not needed. if (line ~ /^R SystemV /) return # Replace FooAsia rules with the same rules without "Asia", as they # are duplicates. if (match(line, /[^ ]Asia /)) { if (line ~ /^R /) return line = substr(line, 1, RSTART) substr(line, RSTART + 5) } # Abbreviate times. while (match(line, /[: ]0+[0-9]/)) line = substr(line, 1, RSTART) substr(line, RSTART + RLENGTH - 1) while (match(line, /:0[^:]/)) line = substr(line, 1, RSTART - 1) substr(line, RSTART + 2) # Abbreviate weekday names. Do not abbreviate "Sun" and "Sat", as # pre-2017c zic erroneously diagnoses "Su" and "Sa" as ambiguous. while (match(line, / (last)?(Mon|Wed|Fri)[ <>]/)) { end = RSTART + RLENGTH line = substr(line, 1, end - 4) substr(line, end - 1) } while (match(line, / (last)?(Tue|Thu)[ <>]/)) { end = RSTART + RLENGTH line = substr(line, 1, end - 3) substr(line, end - 1) } # Abbreviate "max", "only" and month names. # Do not abbreviate "min", as pre-2017c zic erroneously diagnoses "mi" # as ambiguous. gsub(/ max /, " ma ", line) gsub(/ only /, " o ", line) gsub(/ Jan /, " Ja ", line) gsub(/ Feb /, " F ", line) gsub(/ Apr /, " Ap ", line) gsub(/ Aug /, " Au ", line) gsub(/ Sep /, " S ", line) gsub(/ Oct /, " O ", line) gsub(/ Nov /, " N ", line) gsub(/ Dec /, " D ", line) # Strip leading and trailing space. sub(/^ /, "", line) sub(/ $/, "", line) # Remove unnecessary trailing zero fields. sub(/ 0+$/, "", line) # Remove unnecessary trailing days-of-month "1". if (match(line, /[A-Za-z] 1$/)) line = substr(line, 1, RSTART) # Remove unnecessary trailing " Ja" (for January). sub(/ Ja$/, "", line) n = split(line, field) # Abbreviate rule names. i = field[1] == "Z" ? 4 : field[1] == "Li" ? 0 : 2 if (i && field[i] ~ /^[^-+0-9]/) { if (!rule[field[i]]) rule[field[i]] = gen_rule_name() field[i] = rule[field[i]] } # If this zone supersedes an earlier one, delete the earlier one # from the saved output lines. startdef = "" if (field[1] == "Z") zonename = startdef = field[2] else if (field[1] == "Li") zonename = startdef = field[3] else if (field[1] == "R") zonename = "" if (startdef) { i = zonedef[startdef] if (i) { do output_line[i - 1] = "" while (output_line[i++] ~ /^[-+0-9]/); } } zonedef[zonename] = nout + 1 # Save the line for later output. line = field[1] for (i = 2; i <= n; i++) line = line " " field[i] output_line[nout++] = line } function output_saved_lines(i) { for (i = 0; i < nout; i++) if (output_line[i]) print output_line[i] } BEGIN { print "# version", version print "# This zic input file is in the public domain." } /^[\t ]*[^#\t ]/ { process_input_line($0) } END { output_saved_lines() } @ 1.1.2.1 log @Pull up the following revisions, requested by kre in tickt #1539: external/public-domain/tz/dist/CONTRIBUTING up to 1.1.1.5 external/public-domain/tz/dist/Makefile up to 1.1.1.20 external/public-domain/tz/dist/NEWS up to 1.1.1.21 external/public-domain/tz/dist/README up to 1.1.1.6 external/public-domain/tz/dist/TZDATA_VERSION up to 1.11 external/public-domain/tz/dist/africa up to 1.1.1.14 external/public-domain/tz/dist/antarctica up to 1.1.1.10 external/public-domain/tz/dist/asia up to 1.1.1.19 external/public-domain/tz/dist/australasia up to 1.1.1.14 external/public-domain/tz/dist/backzone up to 1.1.1.14 external/public-domain/tz/dist/calendars up to 1.1.1.1 external/public-domain/tz/dist/checktab.awk up to 1.1.1.9 external/public-domain/tz/dist/europe up to 1.1.1.20 external/public-domain/tz/dist/leap-seconds.list up to 1.1.1.9 external/public-domain/tz/dist/leapseconds up to 1.1.1.10 external/public-domain/tz/dist/northamerica up to 1.1.1.19 external/public-domain/tz/dist/southamerica up to 1.1.1.14 external/public-domain/tz/dist/theory.html up to 1.1.1.3 external/public-domain/tz/dist/version up to 1.1.1.8 external/public-domain/tz/dist/ziguard.awk up to 1.1.1.1 external/public-domain/tz/dist/zishrink.awk up to 1.1.1.3 external/public-domain/tz/dist/zone.tab up to 1.1.1.14 external/public-domain/tz/dist/zone1970.tab up to 1.1.1.16 (with external/public-domain/tz/dist/ -> share/zoneinfo/) share/zoneinfo/Theory delete doc/3RDPARTY (patch) distrib/sets/lists/base/mi 1.1164 Update of /cvsroot/src/external/public-domain/tz/dist In directory ivanova.netbsd.org:/tmp/cvs-serv18468 Log Message: 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)). Summary of changes in tzdata2017c: Northern Cyprus switches from +03 to +02/+03 on 2017-10-29. Fiji ends DST 2018-01-14, not 2018-01-21. Namibia switches from +01/+02 to +02 on 2018-04-01. Sudan switches from +03 to +02 on 2017-11-01. Tonga likely switches from +13/+14 to +13 on 2017-11-05. Turks & Caicos switches from -04 to -05/-04 on 2018-11-04. Some corrections to (mostly ancient) historical data. Summary of changes in tzdata2018c (2018-01-22 23:00:44 -0800): Summary of changes in tzdata2018b (2018-01-17 23:24:48 -0800): Summary of changes in tzdata2018a (2018-01-12 22:29:21 -0800): 2018a and 2018b were (kind of) released, but never announced. Some "issues" were found with them that caused the relatively quick updates... The updates are from the previous version (2017c) to the current one (2018c) - that 2018a & 2018b intervened is best forgotten... (changes in 2018a that were corrected (2018b) or reverted (2018c) are not mentioned). Briefly: Sao Tome and Principe (An island nation off west coast of Equatorial Africa) switched from +00 to +01. Brazil's DST will now start on November's first Sunday. Use Debian-style installation locations, instead of 4.3BSD-style. (this does not affect NetBSD, we do not use the tzdata Makefile) Changes to past and future time stamps Sao Tome and Principe switched from +00 to +01 on 2018-01-01 at 01:00. (Thanks to Steffen Thorsen and Michael Deckers.) Changes to future time stamps Starting in 2018 southern Brazil will begin DST on November's first Sunday instead of October's third Sunday. (Thanks to Steffen Thorsen.) Changes to past time stamps Japanese DST transitions (1948-1951) were Sundays at 00:00, not Saturdays or Sundays at 02:00. (Thanks to Takayuki Nikai.) A discrepancy of 4 s in timestamps before 1931 in South Sudan has been corrected. The 'backzone' and 'zone.tab' files did not agree with the 'africa' and 'zone1970.tab' files. (Problem reported by Michael Deckers.) The abbreviation invented for Bolivia Summer Time (1931-2) is now BST instead of BOST, to be more consistent with the convention used for Latvian Summer Time (1918-9) and for British Summer Time. @ text @a0 157 # Convert tzdata source into a smaller version of itself. # Contributed by Paul Eggert. This file is in the public domain. # This is not a general-purpose converter; it is designed for current tzdata. # 'zic' should treat this script's output as if it were identical to # this script's input. # Return a new rule name. # N_RULE_NAMES keeps track of how many rule names have been generated. function gen_rule_name(alphabet, base, rule_name, n, digit) { alphabet = "" alphabet = alphabet "ABCDEFGHIJKLMNOPQRSTUVWXYZ" alphabet = alphabet "abcdefghijklmnopqrstuvwxyz" alphabet = alphabet "!$%&'()*+,./:;<=>?@@[\\]^_`{|}~" base = length(alphabet) rule_name = "" n = n_rule_names++ do { n -= rule_name && n <= base digit = n % base rule_name = substr(alphabet, digit + 1, 1) rule_name n = (n - digit) / base } while (n); return rule_name } # Process an input line and save it for later output. function process_input_line(line, field, end, i, n, startdef) { # Remove comments, normalize spaces, and append a space to each line. sub(/#.*/, "", line) line = line " " gsub(/[\t ]+/, " ", line) # Abbreviate keywords. Do not abbreviate "Link" to just "L", # as pre-2017c zic erroneously diagnoses "Li" as ambiguous. sub(/^Link /, "Li ", line) sub(/^Rule /, "R ", line) sub(/^Zone /, "Z ", line) # SystemV rules are not needed. if (line ~ /^R SystemV /) return # Replace FooAsia rules with the same rules without "Asia", as they # are duplicates. if (match(line, /[^ ]Asia /)) { if (line ~ /^R /) return line = substr(line, 1, RSTART) substr(line, RSTART + 5) } # Abbreviate times. while (match(line, /[: ]0+[0-9]/)) line = substr(line, 1, RSTART) substr(line, RSTART + RLENGTH - 1) while (match(line, /:0[^:]/)) line = substr(line, 1, RSTART - 1) substr(line, RSTART + 2) # Abbreviate weekday names. Do not abbreviate "Sun" and "Sat", as # pre-2017c zic erroneously diagnoses "Su" and "Sa" as ambiguous. while (match(line, / (last)?(Mon|Wed|Fri)[ <>]/)) { end = RSTART + RLENGTH line = substr(line, 1, end - 4) substr(line, end - 1) } while (match(line, / (last)?(Tue|Thu)[ <>]/)) { end = RSTART + RLENGTH line = substr(line, 1, end - 3) substr(line, end - 1) } # Abbreviate "max", "only" and month names. # Do not abbreviate "min", as pre-2017c zic erroneously diagnoses "mi" # as ambiguous. gsub(/ max /, " ma ", line) gsub(/ only /, " o ", line) gsub(/ Jan /, " Ja ", line) gsub(/ Feb /, " F ", line) gsub(/ Apr /, " Ap ", line) gsub(/ Aug /, " Au ", line) gsub(/ Sep /, " S ", line) gsub(/ Oct /, " O ", line) gsub(/ Nov /, " N ", line) gsub(/ Dec /, " D ", line) # Strip leading and trailing space. sub(/^ /, "", line) sub(/ $/, "", line) # Remove unnecessary trailing zero fields. sub(/ 0+$/, "", line) # Remove unnecessary trailing days-of-month "1". if (match(line, /[A-Za-z] 1$/)) line = substr(line, 1, RSTART) # Remove unnecessary trailing " Ja" (for January). sub(/ Ja$/, "", line) n = split(line, field) # Abbreviate rule names. i = field[1] == "Z" ? 4 : field[1] == "Li" ? 0 : 2 if (i && field[i] ~ /^[^-+0-9]/) { if (!rule[field[i]]) rule[field[i]] = gen_rule_name() field[i] = rule[field[i]] } # If this zone supersedes an earlier one, delete the earlier one # from the saved output lines. startdef = "" if (field[1] == "Z") zonename = startdef = field[2] else if (field[1] == "Li") zonename = startdef = field[3] else if (field[1] == "R") zonename = "" if (startdef) { i = zonedef[startdef] if (i) { do output_line[i - 1] = "" while (output_line[i++] ~ /^[-+0-9]/); } } zonedef[zonename] = nout + 1 # Save the line for later output. line = field[1] for (i = 2; i <= n; i++) line = line " " field[i] output_line[nout++] = line } function output_saved_lines(i) { for (i = 0; i < nout; i++) if (output_line[i]) print output_line[i] } BEGIN { print "# version", version print "# This zic input file is in the public domain." } /^[\t ]*[^#\t ]/ { process_input_line($0) } END { output_saved_lines() } @