myusuf3 / delorean

Delorean: Time Travel Made Easy
http://delorean.rtfd.org/
MIT License
1.84k stars 128 forks source link

Issue with tzlocal==5.0 #120

Open LFBianchi opened 1 year ago

LFBianchi commented 1 year ago

Apparently the newest version of tzlocal (5.0) is causing an error on the parse function.

Python 3.9

Environment:

Delorean==1.0.0
tzlocal==5.0

Run:

from delorean import parse                                                                                                                                                                                                                                                                                                                      print(parse("2023-05-15T00:00:00.000Z", yearfirst=True, dayfirst=False))

Error:

AttributeError("'ZoneInfo' object has no attribute 'localize'")

If we change the environment to:

Delorean==1.0.0
tzlocal==4.3

The issue is resolved