Closed monstrorivas closed 3 years ago
What is the error?
Oh, I see, yes, this is the API change in version 3. Version 3 uses ZoneInfo objects instead of pytz objects. If you want to use pytz, you should indeed stay with version 2.1.
Sorry for the late reply. For reference the error is:
AttributeError: 'NoneType' object has no attribute 'total_seconds'
Thank you for the information. I didn't know there was a change in the API. In that case, I can use something like this to make it work
pd_end = pd.to_datetime(datetime.datetime.now())
pd_end.tz_localize(str(tzlocal.get_localzone()))
No, it's hard to communicate that. I probably should have had a version 2.2 that logged a warning, but then again, how many people would have seen that?
In version tzlocal==3.0b1, I run into an AttributeError when assigning a time zone to pandas Timestamp with no timezone
It can be reproduce with the following code:
The same code works just fine with tzlocal==2.1 (pandas == 1.2.4 for both)