From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322) Description of problem: When mktime() is called with 2nd long hour on the daylight saving's long day, it returns the GMT time the same as the first hour on the long day even the tm_isdst is set to 0. Note: for the first hour --> tim_isdst is set to 1 (mktime works OK) for the second hour -> tim_isdst is set to 0 (mktime retunrs the same GMT time as the first hour instead of 3600 seconds more) Version-Release number of selected component (if applicable): glibc-2.3.2-95.27 How reproducible: Always Steps to Reproduce: 1. Check your system's daya light saving long day 2. Write test program to call mktime() with your system;s long time 3. Pass the first hour and second long hour to mktime() Actual Results: Check the return from mktime() both hours return the same time Expected Results: The second hour should be 3600 seconds more than the first hour Additional info:
$ cat /tmp/mktime.c #include <time.h> #include <sys/time.h> #include <stdio.h> #include <stdlib.h> int main (void) { struct tm tm; char buf[120]; time_t t; setenv ("TZ", "Europe/Prague", 1); tzset (); t = 1099181079; tm = *localtime (&t); if (strftime (buf, 120, "%a, %d %b %Y %H:%M:%S %z", &tm)) fputs (buf, stdout); printf (" isdst %d == %ld\n", tm.tm_isdst, (long) mktime (&tm)); t = 1099184679; tm = *localtime (&t); if (strftime (buf, 120, "%a, %d %b %Y %H:%M:%S %z", &tm)) fputs (buf, stdout); printf (" isdst %d == %ld\n", tm.tm_isdst, (long) mktime (&tm)); return 0; } $ gcc -o /tmp/mktime{,.c}; /tmp/mktime Sun, 31 Oct 2004 02:04:39 +0200 isdst 1 == 1099181079 Sun, 31 Oct 2004 02:04:39 +0100 isdst 0 == 1099184679
Can you provide a testcase? The test I posted above shows things work as they are supposed to.
If you have a testcase that shows some bug, please reopen.