Message238648
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:32 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, lemburg, belopolsky |
2015-03-20 11:30:32 | serhiy.storchaka | set | messageid: <1426851032.32.0.560407728917.issue23718@psf.upfronthosting.co.za> |
2015-03-20 11:30:32 | serhiy.storchaka | link | issue23718 messages |
2015-03-20 11:30:32 | serhiy.storchaka | create | |
|