This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zach.ware
Recipients aepage, zach.ware
Date 2016-02-09.15:59:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1455033594.23.0.103909007745.issue26321@psf.upfronthosting.co.za>
In-reply-to
Content
This is a documented peculiarity of the %p format code, see the '%p' entry in the table at [1], note 3 in particular.

>>> from datetime import datetime
>>> datetime.strptime('1:00 PM', '%H:%M %p').hour
1
>>> datetime.strptime('1:00 PM', '%I:%M %p').hour
13


[1] https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior
History
Date User Action Args
2016-02-09 15:59:54zach.waresetrecipients: + zach.ware, aepage
2016-02-09 15:59:54zach.waresetmessageid: <1455033594.23.0.103909007745.issue26321@psf.upfronthosting.co.za>
2016-02-09 15:59:54zach.warelinkissue26321 messages
2016-02-09 15:59:54zach.warecreate