[tz] POSIX-TZ-environment-variable-style string rules
Paul Eggert
eggert at cs.ucla.edu
Fri Aug 5 02:02:29 UTC 2016
Alexander Belopolsky wrote:
> I think the best way forward would be to document the fact that a tzfile
> with the last explicit transition not matching a POSIX rule transition is
> invalid and the behavior of localtime with such file is undefined.
Thanks for thinking it through. I implemented that in the attached patches,
which also change zic.c to obey the new restriction on tzfile format. I
installed these patches into the experimental repository on GitHub.
> I suggest fixing the issue in two steps:
>
> 1. Add 2038-03-28 transition to the Morocco rules in the raw africa file.
I don't see how that would work for 32-bit data, since 2038-03-28 is outside the
32-bit window. Another possibility would be to remove Morocco's 2037 transitions
to cater to now-buggy zic implementations like zic 2016f, but I'm not sure it's
worth the hassle.
> 2. Modify zic to warn about raw files where the last explicit transition
> does not match the rule from the POSIX string and add an appropriate
> transition in the binary file.
The attached patch merely adds the appropriate transition without warning. If
someone wants to change zic.c to emit such a warning, that'd be OK too.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-bug-with-Casablanca-in-late-2037.patch
Type: text/x-diff
Size: 5694 bytes
Desc: not available
URL: <http://mm.icann.org/pipermail/tz/attachments/20160804/b5d88040/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-NEWS-Credit-Alexander-Belopolsky.patch
Type: text/x-diff
Size: 838 bytes
Desc: not available
URL: <http://mm.icann.org/pipermail/tz/attachments/20160804/b5d88040/attachment-0001.patch>
More information about the tz
mailing list