[ python-Bugs-1520914 ] time.strftime breakage in 2.4/2.5
SourceForge.net
noreply at sourceforge.net
Tue Jul 18 06:42:04 CEST 2006
Bugs item #1520914, was opened at 2006-07-11 18:52
Message generated for change (Comment added) made by bcannon
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1520914&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Skip Montanaro (montanaro)
Assigned to: Brett Cannon (bcannon)
Summary: time.strftime breakage in 2.4/2.5
Initial Comment:
Up to Python 2.3 this worked just fine:
>>> import time
>>> time.strftime("%Y-%m-%d", (2005, 6, 4) + (0,)*6)
'2005-06-04'
Starting with 2.4 it broke:
>>> import time
>>> time.strftime("%Y-%m-%d", (2005, 6, 4) + (0,)*6)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ValueError: day of year out of range
though if you change the unused fields to 1 it works:
>>> time.strftime("%Y-%m-%d", (2005, 6, 4) + (1,)*6)
'2005-06-04'
While this wasn't documented behavior, it was certainly behaviour that
worked for a long time. It should probably be allowed to continue
working.
Skip
----------------------------------------------------------------------
>Comment By: Brett Cannon (bcannon)
Date: 2006-07-17 21:42
Message:
Logged In: YES
user_id=357491
Fixed in rev. 50696 .
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1520914&group_id=5470
More information about the Python-bugs-list
mailing list