[Python-bugs-list] [ python-Bugs-626570 ] strptime() always returns 0 in dst field
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 21 Oct 2002 16:43:18 -0700
Bugs item #626570, was opened at 2002-10-21 21:59
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=626570&group_id=5470
Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael S. Fischer (otterley)
Assigned to: Nobody/Anonymous (nobody)
Summary: strptime() always returns 0 in dst field
Initial Comment:
time.strptime() has always returned 0 in the Daylight
Savings Time flag of the returned tuple.
This leads to nasty bugs like the "off by an hour" bug
revealed below:
>>> strftime("%Y %b %d %H %M %S %Z",
localtime(int(mktime(strptime("Oct 18
2002 00:00:00", "%b %d %Y %H:%M:%S")))))
'2002 Oct 18 01 00 00 PDT'
----------------------------------------------------------------------
>Comment By: Michael S. Fischer (otterley)
Date: 2002-10-21 23:43
Message:
Logged In: YES
user_id=7820
I've seen it in 1.5.2, 2.1.3, 2.2 and 2.2.1.
----------------------------------------------------------------------
Comment By: Neal Norwitz (nnorwitz)
Date: 2002-10-21 23:34
Message:
Logged In: YES
user_id=33168
Michael, what version(s) of Python does this effect? 2.2.2?
2.3?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=626570&group_id=5470