[tz] iana build failures on Windows
Paul Eggert
eggert at cs.ucla.edu
Sat Apr 24 06:09:13 UTC 2021
On 4/22/21 11:22 PM, Manuela Friedrich wrote:
> please find the tracing output attached.
Thanks. Here's the first line that differs between your output (-) and
mine (+):
-TRACING: lotm_ok=1 tm_ok=1 only_ok=0 lot=-1830384001 t=-1830383664
tm={1911-364T23:49:28 dst=0} lotm={1911-364T23:43:51 dst=0} delta=337
t-lot=337
+TRACING: lotm_ok=1 tm_ok=1 only_ok=0 lot=-1830383326 t=-1830382989
tm={1912-000T00:16:51 dst=0} lotm={1911-364T23:55:06 dst=0} delta=1305
t-lot=337
This difference suggests that for TZ=Africa/Abidjan and the timestamp
-1830383495, tzdb's localtime behaves differently on your platform than
on mine, although the two platforms agree on -1830384001 and on
-1830382989 (the point of disagreement is halfway between the two points
of agreement). localtime should convert this timestamp to 1911-12-31
23:52:17 -00:16:08 LMT (with no DST), but evidently it converts to
something else on your platform.
I see three things that could have gone wrong. First, while looking into
this I noticed that relevant parts of zic.c and localtime.c rely on
implementation-defined behavior when shifting or converting negative
integers. Although I doubt that's your problem please try the latest
GitHub tzdb development version, which has these fixes I installed today:
https://mm.icann.org/pipermail/tz/2021-April/030025.html
https://mm.icann.org/pipermail/tz/2021-April/030024.html
Second, the TZif file for Africa/Abidjan could be incorrect on your
platform, which would mean a portability bug in zic.c. I'm attaching my
Abidjan file (it's binary data) along with Abidjan-od-t-x1.txt, the
output of the shell command 'od -t x1 Africa/Abidjan' (it's a textual
representation of that data). Please compare this to your Abidjan file,
making sure that it's the actual Abidjan file you're using (you perhaps
have multiple near-copies of that file on your system by now...).
Third, there could be a problem in tzdb's localtime code. To test this,
please apply the attached patch zdump-2.diff to otherwise-unmodified
source code and then run 'zdump Africa/Abidjan' (without the '-v'). The
output I get is also attached as zdump-2.txt; what output do you get?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Abidjan
Type: application/octet-stream
Size: 130 bytes
Desc: not available
URL: <http://mm.icann.org/pipermail/tz/attachments/20210423/c2b1fc74/attachment.obj>
-------------- next part --------------
0000000 54 5a 69 66 32 00 00 00 00 00 00 00 00 00 00 00
0000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000040 00 00 00 00 00 00 00 01 00 00 00 01 00 00 00 00
0000060 00 00 00 54 5a 69 66 32 00 00 00 00 00 00 00 00
0000100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000120 00 00 00 00 00 00 01 00 00 00 02 00 00 00 08 ff
0000140 ff ff ff 92 e6 92 48 01 ff ff fc 38 00 00 00 00
0000160 00 00 00 04 4c 4d 54 00 47 4d 54 00 0a 47 4d 54
0000200 30 0a
0000202
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zdump-2.diff
Type: text/x-patch
Size: 2878 bytes
Desc: not available
URL: <http://mm.icann.org/pipermail/tz/attachments/20210423/c2b1fc74/attachment.bin>
-------------- next part --------------
Africa/Abidjan
t=-1830383495 sp->ats[0]=-1830383032 sp->timecnt=1
sp->ats[sp->timecnt-1]=-1830383032 sp->goback=0 sp->goahead=0
i=sp->defaulttype=0
ttisp->tt_utoff=-968
localsub={1911-365 1911-12-31 23:52:17 dst=0}
Sun Dec 31 23:52:17 1911 LMT
More information about the tz
mailing list