Avoid unwrap_shim method

This commit is contained in:
outa 2022-07-14 08:24:55 +02:00
parent 0a16b31444
commit 24d4e47a38

View file

@ -54,7 +54,8 @@ class DayOne(Journal.Journal):
try: try:
timezone = zoneinfo.ZoneInfo(dict_entry["Time Zone"]) timezone = zoneinfo.ZoneInfo(dict_entry["Time Zone"])
except KeyError: except KeyError:
timezone = tzlocal.get_localzone().unwrap_shim() timezone_name = str(tzlocal.get_localzone())
timezone = zoneinfo.ZoneInfo(timezone_name)
date = dict_entry["Creation Date"] date = dict_entry["Creation Date"]
# convert the date to UTC rather than keep messing with # convert the date to UTC rather than keep messing with
# timezones # timezones