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 Tiger-222
Recipients Tiger-222
Date 2019-03-26.15:18:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1553613506.18.0.935251324399.issue36439@roundup.psfhosted.org>
In-reply-to
Content
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?
History
Date User Action Args
2019-03-26 15:18:26Tiger-222setrecipients: + Tiger-222
2019-03-26 15:18:26Tiger-222setmessageid: <1553613506.18.0.935251324399.issue36439@roundup.psfhosted.org>
2019-03-26 15:18:26Tiger-222linkissue36439 messages
2019-03-26 15:18:26Tiger-222create