From 8ab6c5062539faa9423d5ba174a9f2852a822c87 Mon Sep 17 00:00:00 2001 From: bobloy Date: Thu, 19 Nov 2020 13:07:29 -0500 Subject: [PATCH] HOTFIX: Don't be crzy with pytz timezones --- fifo/timezones.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fifo/timezones.py b/fifo/timezones.py index 54d7c3e..bd1c239 100644 --- a/fifo/timezones.py +++ b/fifo/timezones.py @@ -5,6 +5,8 @@ All credit to https://github.com/prefrontal/dateutil-parser-timezones """ # from dateutil.tz import gettz +from datetime import datetime + from pytz import timezone @@ -227,4 +229,6 @@ def assemble_timezones(): timezones["YAKT"] = timezone("Asia/Yakutsk") # Yakutsk Time (UTC+09) timezones["YEKT"] = timezone("Asia/Yekaterinburg") # Yekaterinburg Time (UTC+05) + dt = datetime(2020, 1, 1) + timezones.update((x, y.localize(dt).tzinfo) for x, y in timezones.items()) return timezones