Time format error in Olson TZ rules for Asia

Robert Elz kre at munnari.OZ.AU
Tue Apr 27 06:46:12 UTC 2010


    Date:        Mon, 26 Apr 2010 15:52:55 -0400
    From:        "Olson, Arthur David (NIH/NCI) [E]" <olsona at dc37a.nci.nih.gov>
    Message-ID:  <996D816825CFEA469870126E9050D3F0E1F8DE6E at NIHMLBX11.nih.gov>

  | The challenge is that the end of the last Thursday of March
  | ("Mar lastThu 24:00") isn't always the same thing as the start of
  | the last Friday of March ("Mar lastFri 0:00")

We perhaps should consider extending the format even further to handle
more extreme cases of things like this - we have already seen how long it
is taking to get implementations recognising the 24:00 value in the format,
though that's been in tzcode for ages now - so perhaps we should add a
little more generalisation (somehow) to handle more odd cases like this
so we have distributed code that can handle it, well before any government
decides to do something like

	at 02:00 on the Friday after the last Thursday in March

That would be (kind of) "Mar LastThu 26:00" - except we don't allow 26:00
and I don't think we should, I'd actually suggest something more like

	Mar LastThu/+Fri 02:00

(+Fri meaning "the next Friday" or "-Fri" (The previous Friday), and
perhaps even
	LastSat/-2Fri
(The 2nd Friday before the last Saturday), etc.

The syntax is not so important as the ability to express the kind of
nonsense that politicians might impose upon us, and to have it ready
and distributed long before it becomes needed.

A simpler syntax might be just
	Mar LastThu+1 00:00
(midnight at the start of 1 day after the last Thu in March, ie: lastThu 24:00)
which requires counting days manually when constructing the rule, but
would be much easier to parse correctly.  (And -N of course for N days 
before.)

Normally I'm not much in favour of adding code "just in case", but we
have plenty of experience here of all of the lack of warning time
before changes, the lengthy time it takes before many implementations
gain new features (which is actually a little disturbing when it is only
zic that needs updating), and the weirdness of some of the rules that
the politicians decide upon.   So here, I think this is perhaps justifiable.

If we did this, then we wouldn't need (to use) the 24:00 special case
any more (or not after we wait long enough for implementations to be
updated.)

kre





More information about the tz mailing list