2020-09-29 22:20:46 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
import json
|
|
|
|
import os
|
2022-02-10 01:45:44 +01:00
|
|
|
import sys
|
2020-09-29 22:20:46 +02:00
|
|
|
|
|
|
|
import pytz
|
|
|
|
|
2021-02-12 08:20:45 +01:00
|
|
|
ZULIP_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../")
|
2022-02-10 01:45:44 +01:00
|
|
|
sys.path.insert(0, ZULIP_PATH)
|
|
|
|
|
|
|
|
from zerver.lib.timezone import get_canonical_timezone_map
|
|
|
|
|
2021-02-12 08:20:45 +01:00
|
|
|
OUT_PATH = os.path.join(ZULIP_PATH, "static", "generated", "timezones.json")
|
2020-09-29 22:20:46 +02:00
|
|
|
|
2021-02-12 08:20:45 +01:00
|
|
|
with open(OUT_PATH, "w") as f:
|
2022-02-10 01:45:44 +01:00
|
|
|
json.dump({"timezones": sorted(pytz.all_timezones_set - set(get_canonical_timezone_map()))}, f)
|