Ammar Askar added the comment: The 86,399 upperbound comes from this line (max_fold_seconds=86400):
https://github.com/python/cpython/blob/master/Modules/_datetimemodule.c#L4277-L4278 The bug is introduced as part of the fold detection in this commit: https://github.com/python/cpython/commit/56376cacd2a0f6af834fe4d2a20b1a1095afb26f Window's locatime_s function gives an EINVAL error when time is less than 0. Which is where the OSError comes from. https://msdn.microsoft.com/en-us/library/a442x3ye.aspx ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29097> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com