[issue33631] [ValueError] _strptime.py can't handle 12-hr format strings using '0' instead of '12' for noon and midnight

Ammar Askar report at bugs.python.org
Thu May 24 03:47:55 EDT 2018


Ammar Askar <ammar at ammaraskar.com> added the comment:

0 is excluded because it is not a valid hour in the 12 hour clock.

0:39pm is not a valid time on a 12 hour clock. After 11am you reach 12pm, then 1pm. See the table on the right here: https://en.wikipedia.org/wiki/12-hour_clock

Your data source is encoding the time incorrectly, see this thread here for some solutions: https://stackoverflow.com/a/33317167

----------
nosy: +ammar2
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: crash -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33631>
_______________________________________


More information about the Python-bugs-list mailing list