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 vstinner
Recipients Itay Grudev, belopolsky, vstinner
Date 2016-03-24.12:52:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1458823964.91.0.342619506433.issue26635@psf.upfronthosting.co.za>
In-reply-to
Content
The year 1900 is a delibrate choice, it's even documented:
https://docs.python.org/dev/library/datetime.html#strftime-and-strptime-behavior

"For time objects, the format codes for year, month, and day should not be used, as time objects have no such values. If they’re used anyway, 1900 is substituted for the year, and 1 for the month and day."

> The default year should be <whatever>

If you expect a year, you can easily use dt.replace(year=<whatever>), no?

Or start with a datetime.time object and then build a datetime.datetime using the time? It's up to you.

We will not change a default value, it will break the backward compatibility.
History
Date User Action Args
2016-03-24 12:52:44vstinnersetrecipients: + vstinner, belopolsky, Itay Grudev
2016-03-24 12:52:44vstinnersetmessageid: <1458823964.91.0.342619506433.issue26635@psf.upfronthosting.co.za>
2016-03-24 12:52:44vstinnerlinkissue26635 messages
2016-03-24 12:52:44vstinnercreate