diff options
author | Paul Ganssle <paul@ganssle.io> | 2020-05-18 01:55:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-18 01:55:11 (GMT) |
commit | e527ec8abe0849e784ce100f53c2736986b670ae (patch) | |
tree | 1b638f564cbb69517ba7d9a5fe5d1cbd225bff40 /Lib/zoneinfo/__init__.py | |
parent | 9681953c99b686cf23d1c476a2b26d2ddbec7694 (diff) | |
download | cpython-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__.py | 2 |
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 |