mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-02-12 17:03:59 +08:00
Use pytz for UTC tzinfo
This commit is contained in:
parent
958eacad8e
commit
a363560f36
2 changed files with 3 additions and 1 deletions
|
@ -10,6 +10,7 @@ langdetect
|
|||
Pillow
|
||||
py-pretty
|
||||
pycountry
|
||||
pytz
|
||||
requests
|
||||
subliminal
|
||||
tzlocal
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue