[issue38233] datetime.datetime.fromtimestamp have different behaviour on windows and mac

Alexandre Ouellet report at bugs.python.org
Fri Sep 20 10:55:16 EDT 2019


New submission from Alexandre Ouellet <thecell61 at gmail.com>:

in a python console on a windows machine:

import datetime
d = datetime.datetime.fromtimestamp(0)
d
>datetime.datetime(1969, 12, 31, 19, 0)
d.timestamp()
>OSError: [Errno 22] Invalid argument

on a macOS machine : 

d = datetime.datetime.fromtimestamp(-1)
d
>datetime.datetime(1969, 12, 31, 19, 0)
d.timestamp()
>-1.0

both machines running 3.6.9

I would expect them have the same behaviour.

----------
components: Windows, macOS
messages: 352853
nosy: Alexandre Ouellet, ned.deily, paul.moore, ronaldoussoren, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: datetime.datetime.fromtimestamp have different behaviour on windows and mac
type: crash
versions: Python 3.6

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


More information about the Python-bugs-list mailing list