[New-bugs-announce] [issue22840] strpdate('20141110', '%Y%m%d%H%S') returns wrong date

Doug Gorley report at bugs.python.org
Mon Nov 10 23:01:31 CET 2014


New submission from Doug Gorley:

strptime() is returning the wrong date if I try to parse today's date (2014-11-10) as a string with no separators, and if I ask strpdate() to look for nonexistent hour and minute fields.

>>> datetime.datetime.strptime('20141110', '%Y%m%d').isoformat()
'2014-11-10T00:00:00'
>>> datetime.datetime.strptime('20141110', '%Y%m%d%H%M').isoformat()
'2014-01-01T01:00:00'

----------
components: Library (Lib)
messages: 230977
nosy: dgorley
priority: normal
severity: normal
status: open
title: strpdate('20141110', '%Y%m%d%H%S') returns wrong date
type: behavior
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22840>
_______________________________________


More information about the New-bugs-announce mailing list