From a363560f36963855576a201958a42c7b5c643a5b Mon Sep 17 00:00:00 2001 From: morpheus65535 <5130500+morpheus65535@users.noreply.github.com> Date: Tue, 13 Mar 2018 19:30:29 -0400 Subject: [PATCH] Use pytz for UTC tzinfo --- requirements.txt | 1 + scheduler.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 0f4f2be37..0fc8dfe32 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,6 +10,7 @@ langdetect Pillow py-pretty pycountry +pytz requests subliminal tzlocal diff --git a/scheduler.py b/scheduler.py index 57ceeb07f..b4c8ba614 100644 --- a/scheduler.py +++ b/scheduler.py @@ -7,10 +7,11 @@ from check_update import * from apscheduler.schedulers.background import BackgroundScheduler from datetime import datetime +import pytz from tzlocal import get_localzone if str(get_localzone()) == "local": - scheduler = BackgroundScheduler(timezone=utc) + scheduler = BackgroundScheduler(timezone=pytz.timezone('UTC')) else: scheduler = BackgroundScheduler()