summaryrefslogtreecommitdiffstats
path: root/Lib/zoneinfo/__init__.py
diff options
context:
space:
mode:
authorPaul Ganssle <paul@ganssle.io>2020-05-18 01:55:11 (GMT)
committerGitHub <noreply@github.com>2020-05-18 01:55:11 (GMT)
commite527ec8abe0849e784ce100f53c2736986b670ae (patch)
tree1b638f564cbb69517ba7d9a5fe5d1cbd225bff40 /Lib/zoneinfo/__init__.py
parent9681953c99b686cf23d1c476a2b26d2ddbec7694 (diff)
downloadcpython-e527ec8abe0849e784ce100f53c2736986b670ae.zip
cpython-e527ec8abe0849e784ce100f53c2736986b670ae.tar.gz
cpython-e527ec8abe0849e784ce100f53c2736986b670ae.tar.bz2
bpo-40536: Add zoneinfo.available_timezones (GH-20158)
This was not specified in the PEP, but it will likely be a frequently requested feature if it's not included. This includes only the "canonical" zones, not a simple listing of every valid value of `key` that can be passed to `Zoneinfo`, because it seems likely that that's what people will want.
Diffstat (limited to 'Lib/zoneinfo/__init__.py')
-rw-r--r--Lib/zoneinfo/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/zoneinfo/__init__.py b/Lib/zoneinfo/__init__.py
index 81a2d5e..f5510ee 100644
--- a/Lib/zoneinfo/__init__.py
+++ b/Lib/zoneinfo/__init__.py
@@ -1,6 +1,7 @@
__all__ = [
"ZoneInfo",
"reset_tzpath",
+ "available_timezones",
"TZPATH",
"ZoneInfoNotFoundError",
"InvalidTZPathWarning",
@@ -15,6 +16,7 @@ except ImportError: # pragma: nocover
from ._zoneinfo import ZoneInfo
reset_tzpath = _tzpath.reset_tzpath
+available_timezones = _tzpath.available_timezones
InvalidTZPathWarning = _tzpath.InvalidTZPathWarning