aboutsummaryrefslogtreecommitdiff
path: root/generalresearch/locales/timezone.py
diff options
context:
space:
mode:
Diffstat (limited to 'generalresearch/locales/timezone.py')
-rw-r--r--generalresearch/locales/timezone.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/generalresearch/locales/timezone.py b/generalresearch/locales/timezone.py
index 50d539d..810dba3 100644
--- a/generalresearch/locales/timezone.py
+++ b/generalresearch/locales/timezone.py
@@ -1,9 +1,8 @@
-from typing import Optional
from pytz import country_timezones
-def get_default_timezone(country_iso: str) -> Optional[str]:
+def get_default_timezone(country_iso: str) -> str | None:
# to list all:
# from pytz import country_names, country_timezones
# [country_timezones.get(country) for country in country_names]
@@ -72,6 +71,6 @@ country_default_locale = {
}
-def get_default_locale(country_iso: str) -> Optional[str]:
+def get_default_locale(country_iso: str) -> str | None:
# todo: "https://cdn.simplelocalize.io/public/v1/locales" to fill in the rest?
return country_default_locale.get(country_iso, None)