Superset of all_timezones/common_timezones is hardcoded
Bug #1996504 reported by
Benjamin Drung
This bug report is a duplicate of:
Bug #207604: pytz includes a hard coded list of time zone names.
Edit
Remove
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pytz |
Unknown
|
Unknown
|
|||
python-tz (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
The lists all_timezones and common_timezones are set by reducing a hard-coded list of timezones. These hard-coded lists of timezones are generated on generating the pytz release.
When tzdata adds a timezone or renames one (e.g. bug #1995864), python-tz needs to be updated.
pytz should evaluate the available timezones on the system to work with future tzdata updates.
To post a comment you must log in.
For Python >= 3.9 there is a built-in library that can be used: zoneinfo. available_ timezones( ) for all_timezones().