[tz] Patch for ziguard.awk

Paul Eggert eggert at cs.ucla.edu
Sun Oct 11 18:07:31 UTC 2020


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ziguard.awk-Add-limitations-commentary.patch
Type: text/x-patch
Size: 1460 bytes
Desc: not available
URL: <http://mm.icann.org/pipermail/tz/attachments/20201011/8a29fd0e/attachment.bin>


More information about the tz mailing list