Author joxtoby27
Recipients joxtoby27
Date 2021-11-23.19:11:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1637694672.86.0.81735779429.issue45884@roundup.psfhosted.org>
In-reply-to
Content
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: datetime.datetime(2014, 8, 1, 2, 0)
expected: ValueError: time data '20140812' does not match format '%Y%m%d%H'

datetime.datetime.strptime('2014081201', '%Y%m%d%H%M')
returns: datetime.datetime(2014, 8, 12, 0, 1)
expected: ValueError: time data '2014081201' does not match format '%Y%m%d%H%M'
History
Date User Action Args
2021-11-23 19:11:12joxtoby27setrecipients: + joxtoby27
2021-11-23 19:11:12joxtoby27setmessageid: <1637694672.86.0.81735779429.issue45884@roundup.psfhosted.org>
2021-11-23 19:11:12joxtoby27linkissue45884 messages
2021-11-23 19:11:12joxtoby27create