utc default
This commit is contained in:
parent
abd672ee12
commit
2c12a1ab74
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user