[New-bugs-announce] [issue3269] strptime() makes an error concerning second in arg
Neven Goršić
report at bugs.python.org
Thu Jul 3 13:47:36 CEST 2008
New submission from Neven Goršić <neven.gorsic at gmail.com>:
strptime() allows 60 and 61 sec, but not 62 sec in arg. string
>>> s='02/28/2000 12:33:61 AM'
>>> time.strptime(s,'%m/%d/%Y %I:%M:%S %p')
(2000, 2, 28, 0, 33, 61, 0, 59, -1)
>>> s='02/28/2000 12:33:62 AM'
>>> time.strptime(s,'%m/%d/%Y %I:%M:%S %p')
Traceback (most recent call last):
File "<pyshell#12>", line 1, in <module>
time.strptime(s,'%m/%d/%Y %I:%M:%S %p')
File "C:\Python25\lib\_strptime.py", line 330, in strptime
(data_string, format))
ValueError: time data did not match format: data=02/28/2000 12:33:62 AM
fmt=%m/%d/%Y %I:%M:%S %p
----------
components: None
messages: 69192
nosy: nevgor
severity: normal
status: open
title: strptime() makes an error concerning second in arg
type: compile error
versions: Python 2.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3269>
_______________________________________
More information about the New-bugs-announce
mailing list