While we're at it, use negative DST offsets in vanguard format, since Namibia (like Ireland) used negative DST in winter. * NEWS, africa (Namibia, Africa/Windhoek), ziguard.awk: Implement this. --- NEWS | 10 ++++++++++ africa | 19 +++++++++++++++++-- ziguard.awk | 28 +++++++++++++++++++++++++--- 3 files changed, 52 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 0297fd8..3bbb829 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,15 @@ News for the tz database +Unreleased, experimental changes + + Changes to past time stamps + + For Namibia's transition from +01/+02 to plain +02, change the + transition date from 2017-09-03 at 03:00 to 2017-10-24 at 00:00. + This does not affect UTC offsets, only whether a DST regime was + in place. + + Release 2018d - 2018-03-22 07:05:46 -0700 Briefly: diff --git a/africa b/africa index 2f7217a..e564906 100644 --- a/africa +++ b/africa @@ -992,9 +992,20 @@ Link Africa/Maputo Africa/Lusaka # Zambia # the same time they would normally start DST, the first Sunday in September: # https://www.timeanddate.com/news/time/namibia-new-time-zone.html +# From Paul Eggert (2017-04-05): +# The official date of the time zone change was 2017-10-24. See: +# http://www.lac.org.na/laws/annoSTAT/Namibian%20Time%20Act%209%20of%202017.pd... + # RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S +# The following has standard time in summer and negative daylight +# saving time in winter. It is for when negative SAVE values are used. +# For more about this, see the comments in 'europe' for Rule Eire. +#Rule Namibia 1994 only - Mar 21 0:00 -1:00 +01 +#Rule Namibia 1994 2017 - Sep Sun>=1 2:00 0 CAT +#Rule Namibia 1995 2017 - Apr Sun>=1 2:00 -1:00 +01 +# The following is for when SAVE values are always nonnegative. Rule Namibia 1994 only - Mar 21 0:00 0 - -Rule Namibia 1994 2016 - Sep Sun>=1 2:00 1:00 S +Rule Namibia 1994 2017 - Sep Sun>=1 2:00 1:00 S Rule Namibia 1995 2017 - Apr Sun>=1 2:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8 @@ -1003,7 +1014,11 @@ Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8 2:00 1:00 SAST 1943 Mar 21 2:00 2:00 - SAST 1990 Mar 21 # independence 2:00 - CAT 1994 Mar 21 0:00 - 1:00 Namibia WA%sT 2017 Sep 3 2:00 +# The next line is for when negative SAVE values are used. +# 2:00 Namibia %s 2017 Oct 24 +# The next line is for when SAVE values are always nonnegative. + 1:00 Namibia WA%sT 2017 Oct 24 +# End of daylight saving. 2:00 - CAT # Niger diff --git a/ziguard.awk b/ziguard.awk index 6da3691..710b630 100644 --- a/ziguard.awk +++ b/ziguard.awk @@ -26,6 +26,7 @@ BEGIN { outfile != "main.zi" { in_comment = /^#/ + uncomment = comment_out = 0 # If this line should differ due to Ireland using negative SAVE values, # uncomment the desired version and comment out the undesired one. @@ -37,11 +38,32 @@ outfile != "main.zi" { if ((Rule_Eire \ || (Zone_Dublin_post_1968 && $(in_comment + 3) == "IST/GMT")) \ == vanguard) { - sub(/^#/, "") - } else if (/^[^#]/) { - sub(/^/, "#") + uncomment = in_comment + } else { + comment_out = !in_comment } } + + # If this line should differ due to Namibia using negative SAVE values, + # uncomment the desired version and comment out the undesired one. + Rule_Namibia = /^#?Rule[\t ]+Namibia[\t ]/ + Zone_using_Namibia_rule \ + = (zone == "Africa/Windhoek" && /^#?[\t ]+[12]:00[\t ]/ \ + && $(in_comment + 2) == "Namibia") + if (Rule_Namibia || Zone_using_Namibia_rule) { + if (in_comment == vanguard) { + uncomment = in_comment + } else { + comment_out = !in_comment + } + } + + if (uncomment) { + sub(/^#/, "") + } + if (comment_out) { + sub(/^/, "#") + } } # If a Link line is followed by a Zone line for the same data, comment -- 2.14.3