[issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error

2019-10-30 Thread Michael Zhang


New submission from Michael Zhang :

Discovered this while trying to use a function in `boto3`. Seems like when 
tzlocal() is passed with a 0 to datetime.datetime.fromtimestamp(), it throws an 
"[Errno 22] Invalid argument" error. Using 3.7.4 via Anaconda on Windows 10, 
and tzlocal().tznames's local timezone for me is EST/EDT.

Can replicate through this:
```
import datetime
from dateutil.tz import tzlocal

print(datetime.datetime.fromtimestamp(0, tzlocal()))
```

--
messages: 355720
nosy: mzhang13
priority: normal
severity: normal
status: open
title: datetime.datetime.fromtimestamp(0, tzlocal()) throws error
type: crash
versions: Python 3.7

___
Python tracker 
<https://bugs.python.org/issue38645>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error

2019-10-31 Thread Michael Zhang


Michael Zhang  added the comment:

I think it might be something Windows specific; the original comment includes 
the version and code to reproduce.

--

___
Python tracker 
<https://bugs.python.org/issue38645>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error

2019-10-31 Thread Michael Zhang


Michael Zhang  added the comment:

Yeah, seconded with my own tracing as well.

--

___
Python tracker 
<https://bugs.python.org/issue38645>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com