mirror of https://github.com/zulip/zulip.git
timezone: Improve tzdata parser’s compatibility with zic(8).
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
7222f3fe2b
commit
2e9cd20380
|
@ -9,8 +9,9 @@ def get_canonical_timezone_map() -> Dict[str, str]:
|
|||
canonical = {}
|
||||
with get_tzdata_zi() as f:
|
||||
for line in f:
|
||||
if line.startswith("L "):
|
||||
l, name, alias = line.split()
|
||||
fields = line.split()
|
||||
if fields and "link".startswith(fields[0].lower()): # zic(8) accepts any prefix of Link
|
||||
code, name, alias = fields
|
||||
canonical[alias] = name
|
||||
return canonical
|
||||
|
||||
|
|
Loading…
Reference in New Issue