Bug 57319 - mktime tm_isdst bug
mktime tm_isdst bug
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Aaron Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-12-10 06:06 EST by Tim Waugh
Modified: 2007-04-18 12:38 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-04-24 03:23:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Tim Waugh 2001-12-10 06:06:07 EST
Description of Problem:
mktime seems to treat tm_isdst oddly.


They are surely the same time?  The difference between the mktime
calls is that for the former, tm_isdst is set to 0, while for the
latter it is -1.  If I try 'BST' (with tm_isdst==1), I also get
-3600.

Version-Release number of selected component (if applicable):
glibc-2.2.4-19

How Reproducible:
100%

Steps to Reproduce:
1. date --date="1970-01-01 00:00 GMT" +%s
2. date --date="1970-01-01 00:00 UTC" +%s

Actual Results:
[tim@cyberelk tim]$ date --date="1970-01-01 00:00 GMT" +%s
-3600
[tim@cyberelk tim]$ date --date="1970-01-01 00:00 UTC" +%s
0

Expected Results:
Both should return 0, I think, since both times refer to the same instant.

Additional Information:
In /etc/sysconfig/clock ZONE is "Europe/London".
Comment 1 Alan Cox 2002-12-15 13:45:49 EST
Confirmed still present in 8.0
Comment 2 Ulrich Drepper 2003-04-24 03:23:00 EDT
A little bit of British history: the UK was on UTC+1 from 1968 to 1971.  See
http://student.cusu.cam.ac.uk/~jsm28/british-time/.  Therefore the result you
see is exactly right.

Note You need to log in before you can comment on or make changes to this bug.