Fallback to UTC if no timezone information is available #49

This commit is contained in:
morpheus65535 2018-03-09 23:17:51 -05:00
parent 73676b3226
commit e788570726
3 changed files with 12 additions and 1 deletions

View File

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

View File

@ -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:

View File

@ -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