From b9191cb16bf13fc8dcb9b14d0ecca8d662b48ee9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 May 2018 17:47:25 -0700 Subject: [PROPOSED 4/4] Shrink SpainAfrica away MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * europe (Africa/Ceuta): Add no-op line that clarifies when Ceuta reportedly used Morocco rules; this helps zishrink.awk. * zishrink.awk (process_input_line): Omit SpainAfrica rules, as they duplicate Morocco’s. --- europe | 1 + zishrink.awk | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/europe b/europe index 6994ed8..ed5ebb3 100644 --- a/europe +++ b/europe @@ -3424,6 +3424,7 @@ Zone Africa/Ceuta -0:21:16 - LMT 1900 Dec 31 23:38:44 0:00 1:00 WEST 1918 Oct 7 23:00 0:00 - WET 1924 0:00 Spain WE%sT 1929 + 0:00 - WET 1967 # Help zishrink.awk. 0:00 SpainAfrica WE%sT 1984 Mar 16 1:00 - CET 1986 1:00 EU CE%sT diff --git a/zishrink.awk b/zishrink.awk index 21c71c0..9f07f0c 100644 --- a/zishrink.awk +++ b/zishrink.awk @@ -172,6 +172,11 @@ function process_input_line(line, field, end, i, n, startdef) if (line ~ /^R /) return line = substr(line, 1, RSTART) substr(line, RSTART + 5) } + # Replace SpainAfrica rules with Morocco, as they are duplicates. + if (match(line, / SpainAfrica /)) { + if (line ~ /^R /) return + line = substr(line, 1, RSTART) "Morocco" substr(line, RSTART + RLENGTH - 1) + } # Abbreviate times. while (match(line, /[: ]0+[0-9]/)) -- 2.7.4