time.strftime in 2.4.1 claims data out of range when not

Sheila King sheila at spamcop.net
Fri Apr 22 02:45:11 EDT 2005


I have a web app that has been running just fine for several months under 
Python 2.2.2.

We are preparing to upgrade the server to run Python 2.4.1.

However, part of my web app is throwing an error on this code (that has 
previously worked without exception):

>>> time.strftime("%Y-%m-%d", (Y, M, D, 0,0,0,0,0,0))
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ValueError: day of year out of range
>>> Y
2005
>>> M
5
>>> D
15L


I don't see what parts of the date that I have submitted to strftime are out 
of range?

Also, the phrasing of the error message is a bit odd?
"day of year out of range"

I'm not sure what the
day of a year

would be???

Sheila King
http://www.thinkspot.net/sheila/





More information about the Python-list mailing list