This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients belopolsky, lemburg, serhiy.storchaka
Date 2015-03-20.11:30:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
strptime() can produce invalid time with negative year day when parse year-week-weekday set. Such time is rejected by strftime(), so strptime/strftime roundtrip doesn't work.

>>> t = time.strptime('2015 0 0', '%Y %U %w')
>>> t
time.struct_time(tm_year=2014, tm_mon=12, tm_mday=28, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=6, tm_yday=-3, tm_isdst=-1)
>>> time.strftime('%Y %U %w', t)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: day of year out of range
Date User Action Args
2015-03-20 11:30:32serhiy.storchakasetrecipients: + serhiy.storchaka, lemburg, belopolsky
2015-03-20 11:30:32serhiy.storchakasetmessageid: <>
2015-03-20 11:30:32serhiy.storchakalinkissue23718 messages
2015-03-20 11:30:32serhiy.storchakacreate