Jon Oxtoby added the comment:
I was indeed overlooking the note in the documentation that the leading zero is
optional for some formatters when using strptime. Closing.
--
stage: -> resolved
status: open -> closed
___
Python tracker
Jon Oxtoby added the comment:
Just noticed the potential for this issue was raised in
https://bugs.python.org/msg393688 so it's possible this is not a bug and is the
desired behavior, but the documentation doesn't seem to address the issue
(unless I'm overlooking
New submission from Jon Oxtoby :
Running datetime.strptime against a string containing year, month, day but with
a formatter including %H causes a two-digit day to be split across the day and
hour fields of the datetime:
datetime.datetime.strptime('20140812', '%Y%m%d%H')
returns