Message284218
In Python 3.6.0 if you give datetime.fromtimestamp a very bad value you either get a core dump or an OverflowError. The core dump occurs when no tzinfo is provided, the OverflowError occurs when a tzinfo is provided (such as tzlocal from dateutil). Attached is a minimal script to reproduce the error. Note that this behavior only occurs on certain systems. It does not happen on OSX 10.11.6, but it does happen on Ubuntu 12.04. I imagine it happens on other systems as well, but I haven't tested beyond those two.
Here are the specific errors I get on Ubuntu 12.04. When no tzinfo is provided:
python: /tmp/python-build.20161228223921.28011/Python-3.6.0/Modules/_datetimemodule.c:251: days_before_year: Assertion `year >= 1' failed.
Aborted (core dumped)
When a tzinfo is provided:
Traceback (most recent call last):
File "test1.py", line 11, in <module>
datetime.fromtimestamp(bad_st_mtime, local_time_zone)
File "~/.pyenv/versions/venv36d/lib/python3.6/site-packages/dateutil/tz/_common.py", line 210, in fromutc
dt_wall = self._fromutc(dt)
File "~/.pyenv/versions/venv36d/lib/python3.6/site-packages/dateutil/tz/_common.py", line 195, in _fromutc
return dt + dtdst
OverflowError: date value out of range
I imagine this is related to the fold changes. |
|
Date |
User |
Action |
Args |
2016-12-29 00:50:47 | Jordon Phillips | set | recipients:
+ Jordon Phillips |
2016-12-29 00:50:47 | Jordon Phillips | set | messageid: <1482972647.78.0.524140289263.issue29100@psf.upfronthosting.co.za> |
2016-12-29 00:50:47 | Jordon Phillips | link | issue29100 messages |
2016-12-29 00:50:47 | Jordon Phillips | create | |
|