[issue23717] strptime() with year-weekday pair can produce invalid data
Serhiy Storchaka
report at bugs.python.org
Fri Mar 20 15:36:45 CET 2015
Serhiy Storchaka added the comment:
Actually you can got invalid data for any date.
>>> time.strptime('2015 3 20', '%Y %m %d')
time.struct_time(tm_year=2015, tm_mon=3, tm_mday=20, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=4, tm_yday=79, tm_isdst=-1)
>>> time.strptime('2015 3 20 0', '%Y %m %d %w')
time.struct_time(tm_year=2015, tm_mon=3, tm_mday=20, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=6, tm_yday=79, tm_isdst=-1)
All date values are known, the problem is that they contradict.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23717>
_______________________________________
More information about the Python-bugs-list
mailing list