Superset of all_timezones/common_timezones is hardcoded

Bug #1996504 reported by Benjamin Drung
6
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.

Revision history for this message
Benjamin Drung (bdrung) wrote :

For Python >= 3.9 there is a built-in library that can be used: zoneinfo.available_timezones() for all_timezones().

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.