mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-11 05:33:37 +00:00
Change add new zoneinfo_priority parameter to all gettz() calls.
This commit is contained in:
parent
7d068d496b
commit
35b282e797
2 changed files with 5 additions and 4 deletions
|
@ -78,7 +78,7 @@ def get_tz():
|
|||
t = get_localzone()
|
||||
if isinstance(t, datetime.tzinfo) and hasattr(t, 'zone') and t.zone and hasattr(sickbeard, 'ZONEINFO_DIR'):
|
||||
try:
|
||||
t = tz_fallback(tz.gettz(t.zone))
|
||||
t = tz_fallback(tz.gettz(t.zone, zoneinfo_priority=True))
|
||||
except:
|
||||
t = tz_fallback(t)
|
||||
else:
|
||||
|
@ -303,14 +303,15 @@ def get_network_timezone(network):
|
|||
if not network_dict:
|
||||
load_network_dict()
|
||||
try:
|
||||
timezone = tz.gettz(network_dupes.get(network) or network_dict.get(network.replace(' ', '').lower()))
|
||||
timezone = tz.gettz(network_dupes.get(network) or network_dict.get(network.replace(' ', '').lower()),
|
||||
zoneinfo_priority=True)
|
||||
except:
|
||||
pass
|
||||
|
||||
if timezone is None:
|
||||
cc = re.search(r'\(([a-z]+)\)$', network, flags=re.I)
|
||||
try:
|
||||
timezone = tz.gettz(country_timezones.get(cc.group(1).upper()))
|
||||
timezone = tz.gettz(country_timezones.get(cc.group(1).upper()), zoneinfo_priority=True)
|
||||
except:
|
||||
pass
|
||||
except:
|
||||
|
|
|
@ -224,7 +224,7 @@ class CalendarHandler(BaseHandler):
|
|||
# Limit dates
|
||||
past_date = (datetime.date.today() + datetime.timedelta(weeks=-52)).toordinal()
|
||||
future_date = (datetime.date.today() + datetime.timedelta(weeks=52)).toordinal()
|
||||
utc = tz.gettz('GMT')
|
||||
utc = tz.gettz('GMT', zoneinfo_priority=True)
|
||||
|
||||
# Get all the shows that are not paused and are currently on air
|
||||
myDB = db.DBConnection()
|
||||
|
|
Loading…
Reference in a new issue