Bug 134576
Summary: | Error: mktime() returns wrong GMT time for 2nd long hour on DST long day | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 3 | Reporter: | Cindy <cindy.chang> |
Component: | glibc | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED WORKSFORME | QA Contact: | Brian Brock <bbrock> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3.0 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | ia64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2004-10-30 09:28:30 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Cindy
2004-10-04 18:57:54 UTC
$ 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. |