problem with getdate
Andreas Jaeger
aj@suse.de
Tue Jul 17 01:40:00 GMT 2001
As Hendrik reported, we seem to have a bug in getdate. Calling
getdate twice gives different results for the value of tm_hour:
$ ./get_date_test_c
DateString: 01-Aug-2000 05:06:07
1. conversion:
-------------------------------------------------------------
Data of struct tm:
tm_sec : 7
tm_min : 6
tm_hour : 6
tm_mday : 1
tm_mon : 7
tm_year : 100
tm_wday : 2
tm_yday : 213
tm_isdst : 1
tm_gmtoff: 7200
tm_zone : CEST
getdate: Tue Aug 1 06:06:07 2000
2. conversion:
-------------------------------------------------------------
Data of struct tm:
tm_sec : 7
tm_min : 6
tm_hour : 5
tm_mday : 1
tm_mon : 7
tm_year : 100
tm_wday : 2
tm_yday : 213
tm_isdst : 1
tm_gmtoff: 7200
tm_zone : CEST
getdate: Tue Aug 1 05:06:07 2000
The change from 5 to 6 in tm_hour occurs in the mktime call in getdate_r.
I'm appending the test files. Has anybody an idea what's broken?
Andreas
More information about the Libc-alpha
mailing list