mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-14 06:02:36 +01:00
Fix utils.time.iana_timezone on python < 3.9
This commit is contained in:
parent
4e60d8812d
commit
bc76f7ead4
@ -71,7 +71,7 @@ def iana_timezone(name):
|
|||||||
raise UnknownTimeZone(e.args[0]) from None
|
raise UnknownTimeZone(e.args[0]) from None
|
||||||
elif pytz:
|
elif pytz:
|
||||||
try:
|
try:
|
||||||
timezone = pytz.timezone(name)
|
return pytz.timezone(name)
|
||||||
except pytz.UnknownTimeZoneError as e:
|
except pytz.UnknownTimeZoneError as e:
|
||||||
raise UnknownTimeZone(e.args[0]) from None
|
raise UnknownTimeZone(e.args[0]) from None
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user