utc default

This commit is contained in:
Daniel Tsvetkov 2020-01-06 10:32:44 +01:00
parent abd672ee12
commit 2c12a1ab74

View File

@ -439,7 +439,7 @@ def query_to_dt(query):
def tzinfo_from_offset(offset: str) -> pytz.timezone: def tzinfo_from_offset(offset: str) -> pytz.timezone:
if ':' in offset: if ':' in offset:
offset = ''.join(offset.split(':')) offset = ''.join(offset.split(':'))
tznames = TZ_OFFSETS.get(offset, []) tznames = TZ_OFFSETS.get(offset, ["utc"])
for tzname in tznames: for tzname in tznames:
if tzname.startswith('Etc/GMT'): if tzname.startswith('Etc/GMT'):
return pytz.timezone(tzname) return pytz.timezone(tzname)