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 belopolsky, vstinner
Date 2015-03-03.14:42:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
A leap second will be added in June 2015:

The datetime module explicitly doesn't support leap seconds:
"Note that on non-POSIX systems that include leap seconds in their notion of a timestamp, leap seconds are ignored by fromtimestamp()."

The following bug in oslo.utils was reported because datetime is indirectly used to unserialize a date, but it fails with ValueError("second must be in 0..59") if the second is 60:

Would it be possible to silently drop ignore leap seconds in datetime.datetime constructor, as already done in datetime.datetime.fromtimestamp?

Attached patch modified datetime constructor to drop leap seconds: replace second=60 with second=59. I also changed the error message for second (valid range is now 0..60).
Date User Action Args
2015-03-03 14:42:23vstinnersetrecipients: + vstinner, belopolsky
2015-03-03 14:42:23vstinnersetmessageid: <>
2015-03-03 14:42:23vstinnerlinkissue23574 messages
2015-03-03 14:42:23vstinnercreate