[tz] Possible zic bug in far future calculations?

Paul Eggert eggert at cs.ucla.edu
Sat Dec 30 10:06:56 UTC 2023

On 2023-12-28 03:24, Gilmore Davidson via tz wrote:

> But a strange case I noticed is specific to `America/Ciudad_Juarez`. In 2023c its overall zdump output ended at 2422, not 2499 like other zones.
> In 2023d zdump does go to 2499, but there's now a weird set of transitions in 2422.

Thanks for reporting that. It appears that the 2023d fix in this area 
was incomplete. I installed the attached patch to fix the issue that you 
reported; please give it a try.

> the wonky transitions make me think there's a bug lurking in zic that might affect other transitions at some point, if the conditions are right.

I don't see a bug in zic.c, as the TZif files look good to me. I do see 
a bug in 2023d's localtime.c, that is, in the reference code for 
processing TZif files. I verified this by running:


This built zdump with the system localtime.c, and then zdump works for 
me even without the attached patch. So I'm pretty sure the bug is in 
2023d's localtime.c, not in its zic.c. (I built on Ubuntu 23.10 x86-64.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-localtime.c-bug-America-Ciudad_Juarez-in-2422.patch
Type: text/x-patch
Size: 4652 bytes
Desc: not available
URL: <http://mm.icann.org/pipermail/tz/attachments/20231230/62053317/attachment.bin>

More information about the tz mailing list