Bug 57319 - mktime tm_isdst bug
Summary: mktime tm_isdst bug
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
(Show other bugs)
Version: 8.0
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Aaron Brown
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-12-10 11:06 UTC by Tim Waugh
Modified: 2016-11-24 15:25 UTC (History)
2 users (show)

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: ---


Attachments (Terms of Use)

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.


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