[issue31212] min date can't be converted to timestamp

2017-08-16 Thread STINNER Victor
STINNER Victor added the comment: This error is a side effect of the implementation of the PEP 495. In your timezone, datetime(1, 1, 1, 0, 0, 0).timestamp() creates an internal timestamp with year=0. The problem is that the internal function ymd_to_ord() doesn't support year=0: /* This is

[issue31212] min date can't be converted to timestamp

2017-08-15 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> haypo nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue31212] min date can't be converted to timestamp

2017-08-15 Thread Dave Johansen
New submission from Dave Johansen: This worked in Python 3.6.0 and before: ``` from datetime import datetime d = datetime(1, 1, 1, 0, 0, 0) d.timestamp() ``` The error output is: ``` ValueError: year 0 is out of range ``` But it used to return `-62135658000.0`. Appears to be related to https:/