[tz] Some rules in tz specification files seem to be applied (by zic) outside of their declared period of applicability

Arthur David Olson arthurdavidolson at gmail.com
Thu Jan 17 19:37:32 UTC 2019


zic computes transition times for each zone line (initial or continuation).
As it processes each zone line, it looks for the first transition time
after which standard time is in effect; the abbreviation in use after that
transition is remembered (for readers of the code, remembered in
"startbuf"). After all the transitions for a particular zone continuation
line have been computed, zic tosses in a transition for the line's start
time (the previous line's "until" time) (for readers of the code, it is the
"if (usestart)" section near the end of the main loop in "outzone").

    @dashdashado

On Wed, Jan 16, 2019 at 9:11 PM Parsifal Herzog <parsifal.herzog at parz.ca>
wrote:

> On 2019-01-16 4:41 a.m., Michael H Deckers wrote:
> > In the case at hand, the abbreviation changes from SAST
> >    (for South African Standard Time) to CAT (Central African Time).
> >    This change is appropriate at the date when Namibia became
> >    independent from South Africa.
>
> Michael, this does not answer my question - I am sure that you do
> not mean to imply that zic has read the comment line and somehow
> "knows" that after independence, the time zone abbreviation is going
> to be "CAT".
>
> To make my question perfectly clear, I am going to go through this
> Africa/Windhoek example step by step. Please bear with me if
> some things I write are self-evident - I want to show my reasoning,
> in case somewhere I have made a false step or assumption.
>
> Before I do that, perhaps it would be helpful if you know the context
> in which my question arose: I have a program which parses the
> Olsen Tz data base textual specification, and produces time tables,
> as does zic. The context is in handling worldwide historical dates
> and times, so that other issues such as Gregorian/Julian transitions
> need to be accounted for.
>
> Recently there have been changes to the zone file specifications,
> such as negative dst and times, so while changing my program to
> accommodate these, I noticed that it was inserting standard time
> transitions in periods where no applicable zone Rule existed.
>
> I wondered how this could be - shouldn't it be an error to leave
> a gap in the specification? Investigating, I found that there
> were very many such cases, and even a few zone lines that had
> no applicable rule over the entire period covered by the zone
> line.
>
> The standard time transitions inserted to cover these gaps
> were fine (gmtoffset of the zone, and save = 0), but the
> timzone abbreviation was not so easy to determine - it
> could come from the zone line, i.e. "MSK/MSD", but more often
> the zone line had a format specification, and thus requires an
> applicable rule to work unambiugously. So the program "made up"
> a zone abbreviation using some heuristics, and it output a
> table of its guesses, which I could review and fix by hand if
> necessary.
>
> This was not very satisfactory, so I thought I must be missing
> something and I asked "What would zic do?". I got the source, and
> I didn't get much farther. My program is written in Python,
> zic is in C, and carries a lot of historical baggage that I
> am not familiar with.
>
> So then, on with my exposition, and hopefully the question
> will become clear enough to be answered:
>
>
> In this specific case I am using, I am asking: Where in the
> timezone specification of the Africa/Windhoek zone is it written
> that the abbreviation is changed from "SAST" to "CAT" as of
> Wed Mar 21 1990?
>
> As I interpret the zic manual page, the Zone line
>
>         2:00    -    SAST    1990 Mar 21 # independence
>
> Specifies that as of 1990 Mar 21, midnight, the gmtoffset = 2:00,
> dst save = 0, and the timezone abbreviation = SAST, is no longer
> in effect. As of that time, the next Zone line:
>
>          2:00    Namibia    %s
>
> comes into effect. This specifies that the gmtoffset shall be 2 hours,
> as of 1990 March 20 midnight, and that from that time onwards, one or
> more of the rules named "Namibia" will be applied according to their
> respective periods of applicability to determine changes of
> dst offset and timezone abbreviation, and when they will occur.
>
> Here again, for this example, are all of those rules:
>
> Rule    Namibia    1994    only    -    Mar    21          0:00 -1:00
> WAT
> Rule    Namibia    1994    2017    -    Sep    Sun>=1      2:00  0
>  CAT
> Rule    Namibia    1995    2017    -    Apr    Sun>=1      2:00 -1:00
> WAT
>
> As I read it, according to the zic manual page, NONE of these rules apply
> to the
> years 1990 through 1993. So the dst offset and abbreviation are undefined
> in
> those years. Yet zic, by some unspecified logic, has chosen the second
> rule,
> and entered the transition (according to zdump):
>
> Africa/Windhoek  Tue Mar 20 22:00:00 1990 UT =
>                         Wed Mar 21 00:00:00 1990 CAT isdst=0 gmtoff=7200
>
> So, what is this (so its seems to me) unspecified logic?
> This might read something like:
>
>      During a time period where there is no applicable rule,
>      the dst offset shall be ____
>      and the time zone abbreviation shall be _____.
>
> Where _____ is the answer I am looking for.
>
>
> Thank you, Parsifal
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mm.icann.org/pipermail/tz/attachments/20190117/a1c0420d/attachment.htm>


More information about the tz mailing list