From a64067e9da0ff7a8bd973fe9d2f5d5146efc4fb7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 17 Mar 2024 22:58:45 -0700 Subject: [PROPOSED] ziguard.awk: generalize for proposed Portugal patch This should handle the patch that Tim proposed in: https://mm.icann.org/pipermail/tz/2024-March/058774.html * ziguard.awk: Also support data proposed for Portugal. Update comments to match current code better. --- ziguard.awk | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/ziguard.awk b/ziguard.awk index 7a3404fa..a5fd5491 100644 --- a/ziguard.awk +++ b/ziguard.awk @@ -5,14 +5,10 @@ # This is not a general-purpose converter; it is designed for current tzdata. # It just converts from current source to main, vanguard, and rearguard forms. # Although it might be nice for it to be idempotent, or to be useful -# for converting back and forth between vanguard and rearguard formats, +# for converting back and forth between formats, # it does not do these nonessential tasks now. # -# Although main and vanguard forms are currently equivalent, -# this need not always be the case. When the two forms differ, -# this script can convert either from main to vanguard form (needed then), -# or from vanguard to main form (this conversion would be needed later, -# after main became rearguard and vanguard became main). +# This script can convert from main to vanguard form and vice versa. # There is no need to convert rearguard to other forms. # # When converting to vanguard form, the output can use the line @@ -146,7 +142,7 @@ DATAFORM != "main" { # If this line should differ due to Portugal benefiting from %z if supported, # uncomment the desired version and comment out the undesired one. - if ($0 ~ /^#?[\t ]+-[12]:00[\t ]+Port[\t ]+[%+-]/) { + if ($0 ~ /^#?[\t ]+-[12]:00[\t ]+(Port[\t ]+[%+-]|-[\t ]+(%z|-01)[\t ]+1982 Mar 28)/) { if (($0 ~ /%z/) == (DATAFORM == "vanguard")) { uncomment = in_comment } else { -- 2.40.1