Bug 57319

Summary: mktime tm_isdst bug
Product: [Retired] Red Hat Linux Reporter: Tim Waugh <twaugh>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: Aaron Brown <abrown>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: alan, fweimer
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-04-24 07:23:00 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 Tim Waugh 2001-12-10 11:06:07 UTC
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 18:45:49 UTC
Confirmed still present in 8.0


Comment 2 Ulrich Drepper 2003-04-24 07:23:00 UTC
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.