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 valdemarrolfsen
Recipients belopolsky, p-ganssle, valdemarrolfsen
Date 2020-09-03.11:45:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1599133552.94.0.223502406334.issue41702@roundup.psfhosted.org>
In-reply-to
Content
Inconsistency in strftime between python 3.6 and 3.7 when parsing first-century dates.

Python 3.6
>>> datetime.datetime.strptime(d, "%Y-%m-%d").strftime("%Y-%m-%d")
'0020-10-05'

Python 3.7
>>> datetime.datetime.strptime("0020-10-05", "%Y-%m-%d").strftime("%Y-%m-%d")
'20-10-05'

This means that the following would work for 3.6 but raise a ValueError for 3.7:

>>> d = "0020-10-05"
>>> d = datetime.datetime.strptime(d, "%Y-%m-%d").strftime("%Y-%m-%d")
>>> d = datetime.datetime.strptime(d, "%Y-%m-%d").strftime("%Y-%m-%d")
History
Date User Action Args
2020-09-03 11:45:52valdemarrolfsensetrecipients: + valdemarrolfsen, belopolsky, p-ganssle
2020-09-03 11:45:52valdemarrolfsensetmessageid: <1599133552.94.0.223502406334.issue41702@roundup.psfhosted.org>
2020-09-03 11:45:52valdemarrolfsenlinkissue41702 messages
2020-09-03 11:45:52valdemarrolfsencreate