Skip to content

Commit

Permalink
Shrink SpainAfrica away
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
eggert committed May 14, 2018
1 parent f73e9da commit b9191cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions europe
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions zishrink.awk
Original file line number Diff line number Diff line change
Expand Up @@ -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]/))
Expand Down

0 comments on commit b9191cb

Please sign in to comment.