You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My local time zone is Europe/Paris and I noticed that on Windows the following operation crashed:
>>> datetime.fromtimestamp(0,tz.tzlocal())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Anaconda3\lib\site-packages\dateutil\tz.py", line 99, in utcoffset
if self._isdst(dt):
File "C:\Anaconda3\lib\site-packages\dateutil\tz.py", line 143, in _isdst
return time.localtime(timestamp+time.timezone).tm_isdst
OSError: [Errno 22] Invalid argument
The same on Linux is working fine.
Looking at the code I discovered that the issue is caused by the call to time.localtime() with -3600 as argument. This is working fine on Linux but not on Windows.