[tz] iana build failures on Windows

Manuela Friedrich Manuela.Friedrich at actian.com
Thu Apr 22 11:44:47 UTC 2021


Hello Paul,

I've added the tracing, please see:

diff --git a/zdump.c b/zdump.c
index 16e73ae..f33a925 100644
--- a/zdump.c
+++ b/zdump.c
@@ -696,6 +696,7 @@ hunt(timezone_t tz, char *name, time_t lot, struct tm *lotmp, time_t hit,
                if (t == lot)
                        break;
                tm_ok = my_localtime_rz(tz, &t, &tm) != NULL;
+               printf("TRACING: only_ok = %d | delta(&tm,&lotm) = %d | t - lot = %d \n", only_ok, delta(&tm, &lotm), t - lot);
                if (lotm_ok == tm_ok
                    && (only_ok
                        || (lotm_ok && tm.tm_isdst == lotm.tm_isdst


skipped the only_ok = 1 output
TRACING: only_ok = 0 | delta(&tm,&lotm) = 22568 | t - lot = 21600 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 11768 | t - lot = 10800 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 6368 | t - lot = 5400 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 3668 | t - lot = 2700 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 2318 | t - lot = 1350 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 675 | t - lot = 675 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 337 | t - lot = 337 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 168 | t - lot = 168 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 84 | t - lot = 84 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 42 | t - lot = 42 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 21 | t - lot = 21 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 10 | t - lot = 10 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 5 | t - lot = 5 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 2 | t - lot = 2 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 1 | t - lot = 1 
d:\devsrc\treasure_test\iana\zoneinfo\iana\Africa\Abidjan  Sun Dec 31 23:59:59 1911 UT = Sun Dec 31 23:43:51 1911 LMT isdst=0 gmtoff=-968
d:\devsrc\treasure_test\iana\zoneinfo\iana\Africa\Abidjan  Mon Jan  1 00:00:00 1912 UT = Sun Dec 31 23:43:52 1911 LMT isdst=0 gmtoff=-968
TRACING: only_ok = 0 | delta(&tm,&lotm) = 22568 | t - lot = 21600 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 11768 | t - lot = 10800 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 6368 | t - lot = 5400 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 3668 | t - lot = 2700 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 2318 | t - lot = 1350 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 675 | t - lot = 675 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 337 | t - lot = 337 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 168 | t - lot = 168 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 84 | t - lot = 84 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 42 | t - lot = 42 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 21 | t - lot = 21 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 10 | t - lot = 10 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 5 | t - lot = 5 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 2 | t - lot = 2 
TRACING: only_ok = 0 | delta(&tm,&lotm) = 1 | t - lot = 1 
d:\devsrc\treasure_test\iana\zoneinfo\iana\Africa\Abidjan  Mon Jan  1 00:00:00 1912 UT = Sun Dec 31 23:43:52 1911 LMT isdst=0 gmtoff=-968
d:\devsrc\treasure_test\iana\zoneinfo\iana\Africa\Abidjan  Mon Jan  1 00:00:01 1912 UT = Sun Dec 31 23:43:53 1911 LMT isdst=0 gmtoff=-968
....

Regards
Manuela Friedrich

-----Original Message-----
From: Paul Eggert <eggert at cs.ucla.edu> 
Sent: Mittwoch, 21. April 2021 20:34
To: Manuela Friedrich <Manuela.Friedrich at actian.com>
Cc: Steven Shuriff <Steven.Shuriff at actian.com>; Time zone mailing list <tz at iana.org>
Subject: Re: iana build failures on Windows

On 4/20/21 4:57 AM, Manuela Friedrich wrote:
> I still would like to double check about the zdump -v output for Africa Abidjan.
> I am getting 1946 lines of output.
> Is that in the range you get on Linux?

No, all I get is the following.

> Africa/Abidjan  -9223372036854775808 = NULL Africa/Abidjan  
> -67768040609740801 = NULL Africa/Abidjan  Thu Jan  1 00:00:00 
> -2147481748 UT = NULL Africa/Abidjan  Thu Jan  1 00:16:07 -2147481748 
> UT = NULL Africa/Abidjan  Thu Jan  1 00:16:08 -2147481748 UT = Thu Jan  
> 1 00:00:00 -2147481748 LMT isdst=0 gmtoff=-968 Africa/Abidjan  Mon Jan  
> 1 00:16:07 1912 UT = Sun Dec 31 23:59:59 1911 LMT isdst=0 gmtoff=-968 
> Africa/Abidjan  Mon Jan  1 00:16:08 1912 UT = Mon Jan  1 00:16:08 1912 
> GMT isdst=0 gmtoff=0 Africa/Abidjan  Wed Dec 31 23:59:59 2147485547 UT 
> = Wed Dec 31 23:59:59 2147485547 GMT isdst=0 gmtoff=0 Africa/Abidjan  
> 67768036191676800 = NULL Africa/Abidjan  9223372036854775807 = NULL

So it appears that there is still some problem on MS-Windows that we haven't gotten to the bottom of. Looking at the output you sent me in earlier email (quoted below), it appears that there a problem starting at Sun Dec 31 23:59:59 1911 UT. Starting then, on your MS-Windows port for some reason zdump thinks there is a transition every second.

> d:\devsrc\treasure_test\iana\zoneinfo\iana\Africa\Abidjan  
> -9223372036854775808 = NULL 
> d:\devsrc\treasure_test\iana\zoneinfo\iana\Africa\Abidjan  
> -67768040609740801 = NULL 
> d:\devsrc\treasure_test\iana\zoneinfo\iana\Africa\Abidjan  Thu Jan  1 
> 00:00:00 -2147481748 UT = NULL 
> d:\devsrc\treasure_test\iana\zoneinfo\iana\Africa\Abidjan  Thu Jan  1 
> 00:16:07 -2147481748 UT = NULL 
> d:\devsrc\treasure_test\iana\zoneinfo\iana\Africa\Abidjan  Thu Jan  1 
> 00:16:08 -2147481748 UT = Thu Jan  1 00:00:00 -2147481748 LMT isdst=0 
> gmtoff=-968 d:\devsrc\treasure_test\iana\zoneinfo\iana\Africa\Abidjan  
> Sun Dec 31 23:59:59 1911 UT = Sun Dec 31 23:43:51 1911 LMT isdst=0 
> gmtoff=-968 d:\devsrc\treasure_test\iana\zoneinfo\iana\Africa\Abidjan  Mon Jan  1 00:00:00 1912 UT = Sun Dec 31 23:43:52 1911 LMT isdst=0 gmtoff=-968 d:\devsrc\treasure_test\iana\zoneinfo\iana\Africa\Abidjan  Mon Jan  1 00:00:00 1912 UT = Sun Dec 31 23:43:52 1911 LMT isdst=0 gmtoff=-968 d:\devsrc\treasure_test\iana\zoneinfo\iana\Africa\Abidjan  Mon Jan  1 00:00:01 1912 UT = Sun Dec 31 23:43:53 1911 LMT isdst=0 gmtoff=-968 d:\devsrc\treasure_test\iana\zoneinfo\iana\Africa\Abidjan  Mon Jan  1 00:00:01 1912 UT = Sun Dec 31 23:43:53 1911 LMT isdst=0 gmtoff=-968 d:\devsrc\treasure_test\iana\zoneinfo\iana\Africa\Abidjan  Mon Jan  1 00:00:02 1912 UT = Sun Dec 31 23:43:54 1911 LMT isdst=0 gmtoff=-968 d:\devsrc\treasure_test\iana\zoneinfo\iana\Africa\Abidjan  Mon Jan  1 00:00:02 1912 UT = Sun Dec 31 23:43:54 1911 LMT isdst=0 gmtoff=-968 ...

My suspicion is that the following line in zdump.c (line 702) is the culprit somehow:

                             && delta(&tm, &lotm) == t - lot

That is, I suspect that delta(&tm, &lotm) is not equal to t - lot, even though it should be in the "transitions" that zdump is reporting incorrectly. Here, tm is the result of calling localtime on t and lotm is the result of calling localtime on lot, and in this incorrect "transitions" t = lot + 1. Perhaps you can investigate my guess with a debugger, or by inserting debugging printfs to see why zdump is going awry.



More information about the tz mailing list