[issue35796] time.localtime returns error for negative values

Ammar Askar report at bugs.python.org
Sun Feb 10 21:22:30 EST 2019


Ammar Askar <ammar at ammaraskar.com> added the comment:

Victor is correct, this is a limitation in Windows. As the documentation for time notes:

>Although this module is always available, not all functions are available on all platforms. Most of the functions defined in this module call platform C library functions with the same name. It may sometimes be helpful to consult the platform documentation, because the semantics of these functions varies among platforms.

https://docs.python.org/3/library/time.html#module-time

And as the Windows documentation notes: 

>less than 0 or greater than _MAX__TIME64_T: EINVAL

https://msdn.microsoft.com/en-us/library/a442x3ye.aspx?f=255&MSPPError=-2147217396

----------
nosy: +ammar2
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35796>
_______________________________________


More information about the Python-bugs-list mailing list