Message238648
| 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 |
<1426851032.32.0.560407728917.issue23718@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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 |
|
History
|
|---|
| 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 |
|