Author swalker
Recipients Martin.Morrison, belopolsky, hynek, swalker, vstinner
Date 2012-02-29.18:54:24
SpamBayes Score 1.13298e-07
Marked as misclassified No
Message-id <1330541665.38.0.00380983944229.issue14157@psf.upfronthosting.co.za>
In-reply-to
Content
I'm seeing this when a year *is* specified with Python 2.6 and 2.7:


import time
time.strptime("20090229T184823Z", "%Y%m%dT%H%M%SZ")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/_strptime.py", line 454, in _strptime_time
    return _strptime(data_string, format)[0]
  File "/usr/lib/python2.6/_strptime.py", line 440, in _strptime
    datetime_date(year, 1, 1).toordinal() + 1
ValueError: day is out of range for month


import datetime
datetime.datetime.strptime("20090229T184823Z", "%Y%m%dT%H%M%SZ")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/_strptime.py", line 440, in _strptime
    datetime_date(year, 1, 1).toordinal() + 1
ValueError: day is out of range for month
History
Date User Action Args
2012-02-29 18:54:25swalkersetrecipients: + swalker, belopolsky, vstinner, hynek, Martin.Morrison
2012-02-29 18:54:25swalkersetmessageid: <1330541665.38.0.00380983944229.issue14157@psf.upfronthosting.co.za>
2012-02-29 18:54:24swalkerlinkissue14157 messages
2012-02-29 18:54:24swalkercreate