Skip to content

Commit

Permalink
Namibia was on DST until 2017-10-24
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
eggert committed Apr 6, 2018
1 parent 27f32ae commit 3796d87
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 5 deletions.
10 changes: 10 additions & 0 deletions 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:
Expand Down
19 changes: 17 additions & 2 deletions africa
Expand Up @@ -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.pdf

# 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
Expand All @@ -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
Expand Down
28 changes: 25 additions & 3 deletions ziguard.awk
Expand Up @@ -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.
Expand All @@ -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
Expand Down

0 comments on commit 3796d87

Please sign in to comment.