[issue6823] time.strftime does unnecessary range check

2009-09-21 Thread Brett Cannon
Brett Cannon 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, for the initial

[issue6823] time.strftime does unnecessary range check

2009-09-08 Thread Brett Cannon
Changes by Brett Cannon : -- keywords: +patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue6823] time.strftime does unnecessary range check

2009-09-08 Thread Richard Shapiro
Richard Shapiro 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 --- /home/rshapiro/216/redist/Python-2.5.1/Modules/timemodule.c.di

[issue6823] time.strftime does unnecessary range check

2009-09-03 Thread Brett Cannon
Brett Cannon 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 stage: -> test ne

[issue6823] time.strftime does unnecessary range check

2009-09-03 Thread Georg Brandl
Georg Brandl added the comment: Assigning to Brett who added this check in r35368. -- assignee: -> brett.cannon nosy: +brett.cannon, georg.brandl ___ Python tracker ___

[issue6823] time.strftime does unnecessary range check

2009-09-02 Thread Richard Shapiro
New submission from Richard Shapiro : 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 savings flag out of