New submission from Andrew Page: ## ## It appears that strptime is ignoring the AM/PM field ## from datetime import datetime d1 = datetime.strptime("1:00 PM", "%H:%M %p") d2 = datetime.strptime("1:00 AM", "%H:%M %p") d1.hour, d2.hour (1, 1) # d1 should be 13 d1 == d2 True # and these should not be equal
---------- components: Library (Lib) messages: 259936 nosy: aepage priority: normal severity: normal status: open title: datetime.strptime fails to parse AM/PM correctly versions: Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26321> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com