[Python-bugs-list] [Bug #110696] strptime error (PR#149)
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 23 Aug 2000 11:11:06 -0700
Bug #110696, was updated on 2000-Jul-31 21:29
Here is a current snapshot of the bug.
Project: Python
Category: None
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 3
Summary: strptime error (PR#149)
Details: Jitterbug-Id: 149
Submitted-By: python.org@netfinances.com
Date: Sat, 4 Dec 1999 22:03:43 -0500 (EST)
Version: 1.5.2
OS: RedHat Linux 6.0
strptime throws a ValueError exception when I feed it the hour 02, and a minute
value
equal to 40 or greater the following session illustrates:
1017:26:fred@firestorm:~/public_html >python
Python 1.5.2 (#2, Dec 3 1999, 23:56:19) [GCC egcs-2.91.66 19990314/Linux
(egcs- on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> from time import strptime
>>> t = strptime('0230','%H%M')
>>> t
(1900, 1, 0, 23, 0, 0, 6, 1, 0)
>>> t = strptime('0240','%H%M')
Traceback (innermost last):
File "<stdin>", line 1, in ?
ValueError: format mismatch
>>> t = strptime('0140','%H%M')
>>> t = strptime('0340','%H%M')
>>> t = strptime('0345','%H%M')
>>> t = strptime('0339','%H%M')
>>> t = strptime('0240','%H%M')
Traceback (innermost last):
File "<stdin>", line 1, in ?
ValueError: format mismatch
>>> t = strptime('0245','%H%M')
Traceback (innermost last):
File "<stdin>", line 1, in ?
ValueError: format mismatch
>>> t = strptime('0250','%H%M')
Traceback (innermost last):
File "<stdin>", line 1, in ?
ValueError: format mismatch
>>> t = strptime('0259','%H%M')
Traceback (innermost last):
File "<stdin>", line 1, in ?
ValueError: format mismatch
>>>
====================================================================
Audit trail:
Tue Dec 14 17:22:29 1999 guido sent reply 1
Tue Dec 14 17:22:48 1999 guido resent 149.reply.1
Tue Dec 14 17:24:30 1999 guido sent reply 2
Tue Dec 14 17:24:51 1999 guido changed notes
Tue Dec 14 17:24:51 1999 guido moved from incoming to platformbug
Follow-Ups:
Date: 2000-Aug-01 21:03
By: none
Comment:
From: Guido van Rossum <bugs-py@python.org>
Subject: Re: strptime error (PR#149)
Date: Tue Dec 14 17:22:29 1999
-------------------------------------------------------
Date: 2000-Aug-01 21:03
By: none
Comment:
From: Guido van Rossum <bugs-py@python.org>
Subject: Re: strptime error (PR#149)
Date: Tue Dec 14 17:24:30 1999
> strptime throws a ValueError exception when I feed it the hour 02, and a
minute
> value
> equal to 40 or greater the following session illustrates:
Very strange. I can't reproduce this; I presume your platform's strptime()
has a problem.
--Guido van Rossum
-------------------------------------------------------
Date: 2000-Aug-01 21:03
By: none
Comment:
Must be the strptime() implementation in his C library.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110696&group_id=5470