New submission from Mickaël Schoentgen <cont...@tiger-222.fr>: A similar issue was resolved with issue29097 (with 0 <= t <= 86399).
Here, we have an inconsistency between OSes when using datetime.fromtimestamp(t) when t < 0. Tested on Python 3.6.7. GNU/Linux: >>> datetime.fromtimestamp(-1) datetime.datetime(1970, 1, 1, 0, 59, 59) macOS: >>> datetime.fromtimestamp(-1) datetime.datetime(1970, 1, 1, 0, 59, 59) Windows (7 and 10): >>> datetime.fromtimestamp(-1) Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: [Errno 22] Invalid argument I think having a similar behavior between all Oses would be great, right? ---------- messages: 338893 nosy: Tiger-222 priority: normal severity: normal status: open title: [Windows] datetime.fromtimestamp(t) when t < 0 fails on Python 3.6 versions: Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36439> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com