Brett Cannon br...@python.org added the comment:
time.strftime() now normalizes tm_isdst.
2.7: r75011
3.2: r75012
This could probably be backported to 2.6/3.1, but since this is purely a
convenience thing and it is a (very) minor change in semantics I am not
going to bother.
Thanks, Robert,
Richard Shapiro rashapir...@gmail.com added the comment:
Here's a patch to normalize the results of the various system calls
which return time information. This was against the source for Python 2.5.1.
*** timemodule.cTue Sep 8 10:28:31 2009
---
Changes by Brett Cannon br...@python.org:
--
keywords: +patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6823
___
___
Python-bugs-list mailing
Georg Brandl ge...@python.org added the comment:
Assigning to Brett who added this check in r35368.
--
assignee: - brett.cannon
nosy: +brett.cannon, georg.brandl
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6823
Brett Cannon br...@python.org added the comment:
Ugh, damn platforms and having to be different. =)
Normalization is the best solution as Python's docs says the expected
value for the tm_dst field is -1, 0, or 1 (which is why I added the
check).
--
keywords: +easy
priority: - low
New submission from Richard Shapiro rashapir...@gmail.com:
in Modules/timemodule.c, in the routine time_strftime, there is a range
check on the tm_isdst field:
if (buf.tm_isdst -1 || buf.tm_isdst 1) {
PyErr_SetString(PyExc_ValueError,
daylight