I discovered that the ziguard.awk is not entirely reversible: it doesn't switch between vanguard and rearguard data for Namibia data completely in all cases. Attached is a patch with some more explanation and a proposed fix. It's bigger than strictly necessary because I tidied up the Ireland lines rather than applying the same fix there. Low severity / impact and probably not an issue in the normal release workflow : I discovered it because I was stumbling around generating my own tarballs for testing the proposed 2020b changes. That's not something I usually do. As always, thanks for all the work you do. Neil. -- Google UK Limited Registered Office: 6 Pancras Square, London, N1C 4AG Registered in England Number: 3977902
Thanks; although I would ziguard.awk to be simpler, that patch would mishandle some cases (see below). So for now I'll just install the attached proposed comment to document the primary use cases. If you can clean up ziguard.awk to also be idempotent etc. that would be nice, but it's not essential. $ cp ziguard.awk ziguard.awk.bak $ patch <0001-Fix-ziguard.awk-for-Rule-lines.patch patching file ziguard.awk $ awk -v DATAFORM=rearguard -f ziguard.awk.bak africa antarctica asia australasia europe northamerica southamerica factory backward >old.zi $ awk -v DATAFORM=rearguard -f ziguard.awk africa antarctica asia australasia europe northamerica southamerica factory backward >new.zi $ diff -u old.zi new.zi --- old.zi 2020-10-11 10:34:28.979780689 -0700 +++ new.zi 2020-10-11 10:34:39.351761185 -0700 @@ -8262,13 +8262,13 @@ # summer and negative daylight saving time in winter. It is for when # negative SAVE values are used. # Rule NAME FROM TO - IN ON AT SAVE LETTER/S -#Rule Eire 1971 only - Oct 31 2:00u -1:00 - -#Rule Eire 1972 1980 - Mar Sun>=16 2:00u 0 - -#Rule Eire 1972 1980 - Oct Sun>=23 2:00u -1:00 - -#Rule Eire 1981 max - Mar lastSun 1:00u 0 - -#Rule Eire 1981 1989 - Oct Sun>=23 1:00u -1:00 - -#Rule Eire 1990 1995 - Oct Sun>=22 1:00u -1:00 - -#Rule Eire 1996 max - Oct lastSun 1:00u -1:00 - +Rule Eire 1971 only - Oct 31 2:00u -1:00 - +Rule Eire 1972 1980 - Mar Sun>=16 2:00u 0 - +Rule Eire 1972 1980 - Oct Sun>=23 2:00u -1:00 - +Rule Eire 1981 max - Mar lastSun 1:00u 0 - +Rule Eire 1981 1989 - Oct Sun>=23 1:00u -1:00 - +Rule Eire 1990 1995 - Oct Sun>=22 1:00u -1:00 - +Rule Eire 1996 max - Oct lastSun 1:00u -1:00 - # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Europe/Dublin -0:25:00 - LMT 1880 Aug 2
Thanks for the response. I just looked at some of the later transforms in ziguard.awk, i.e. ones that don't just comment or uncomment. I completely agree it would be difficult to make it reversible! Neil. On Sun, 11 Oct 2020 at 19:07, Paul Eggert <eggert@cs.ucla.edu> wrote:
Thanks; although I would ziguard.awk to be simpler, that patch would mishandle some cases (see below). So for now I'll just install the attached proposed comment to document the primary use cases. If you can clean up ziguard.awk to also be idempotent etc. that would be nice, but it's not essential.
$ cp ziguard.awk ziguard.awk.bak $ patch <0001-Fix-ziguard.awk-for-Rule-lines.patch patching file ziguard.awk $ awk -v DATAFORM=rearguard -f ziguard.awk.bak africa antarctica asia australasia europe northamerica southamerica factory backward >old.zi $ awk -v DATAFORM=rearguard -f ziguard.awk africa antarctica asia australasia europe northamerica southamerica factory backward >new.zi $ diff -u old.zi new.zi --- old.zi 2020-10-11 10:34:28.979780689 -0700 +++ new.zi 2020-10-11 10:34:39.351761185 -0700 @@ -8262,13 +8262,13 @@ # summer and negative daylight saving time in winter. It is for when # negative SAVE values are used. # Rule NAME FROM TO - IN ON AT SAVE LETTER/S -#Rule Eire 1971 only - Oct 31 2:00u -1:00 - -#Rule Eire 1972 1980 - Mar Sun>=16 2:00u 0 - -#Rule Eire 1972 1980 - Oct Sun>=23 2:00u -1:00 - -#Rule Eire 1981 max - Mar lastSun 1:00u 0 - -#Rule Eire 1981 1989 - Oct Sun>=23 1:00u -1:00 - -#Rule Eire 1990 1995 - Oct Sun>=22 1:00u -1:00 - -#Rule Eire 1996 max - Oct lastSun 1:00u -1:00 - +Rule Eire 1971 only - Oct 31 2:00u -1:00 - +Rule Eire 1972 1980 - Mar Sun>=16 2:00u 0 - +Rule Eire 1972 1980 - Oct Sun>=23 2:00u -1:00 - +Rule Eire 1981 max - Mar lastSun 1:00u 0 - +Rule Eire 1981 1989 - Oct Sun>=23 1:00u -1:00 - +Rule Eire 1990 1995 - Oct Sun>=22 1:00u -1:00 - +Rule Eire 1996 max - Oct lastSun 1:00u -1:00 -
# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Europe/Dublin -0:25:00 - LMT 1880 Aug 2
-- Google UK Limited Registered Office: 6 Pancras Square, London, N1C 4AG Registered in England Number: 3977902
participants (2)
-
Neil Fuller -
Paul Eggert