Fallback to UTC if no timezone information is available #49

pull/56/merge
morpheus65535 7 years ago
parent 73676b3226
commit e788570726

@ -12,5 +12,6 @@ py-pretty
pycountry
requests
subliminal
tzlocal
urllib3
waitress

@ -7,8 +7,13 @@ from check_update import *
from apscheduler.schedulers.background import BackgroundScheduler
from datetime import datetime
from tzlocal import get_localzone
if str(get_localzone()) == "local":
scheduler = BackgroundScheduler(timezone=utc)
else:
scheduler = BackgroundScheduler()
scheduler = BackgroundScheduler()
if automatic == 'True':
scheduler.add_job(check_and_apply_update, 'interval', hours=6, max_instances=1, coalesce=True, misfire_grace_time=15, id='update_bazarr', name='Update bazarr from source on Github')
else:

@ -12,5 +12,10 @@ except SystemExit as e:
try:
pip.main(['install', '--user', 'apprise'])
except SystemExit as e:
pass
try:
pip.main(['install', '--user', 'tzlocal'])
except SystemExit as e:
pass
Loading…
Cancel
Save