https://listman.redhat.com/archives/anaconda-devel-list/2021-February/msg00020.html
This is very much untested. I've written it and never actually attempted to run it. Not yet anyway.
I found a problem thou. Python's zoneinfo
does not have any concept of common timezones. I can implement my own method to determine whether a timezone is common (pytz uses zone.tab and a short list of hardcoded values).
With pytz 2021.1, the extra zones effectively added by this PR are:
>>> import pytz, zoneinfo
>>> pytz_zones = {tz for tz in pytz.common_timezones if '/' in tz and not tz.startswith('Etc/')}
>>> zoneinfo_zones = {tz for tz in zoneinfo.available_timezones() if '/' in tz and not tz.startswith('Etc/')}
>>> len(zoneinfo_zones) / len(pytz_zones)
1.1762013729977117
>>> zoneinfo_zones - pytz_zones
{'Africa/Asmera',
'Africa/Timbuktu',
'America/Argentina/ComodRivadavia',
'America/Atka',
'America/Buenos_Aires',
'America/Catamarca',
'America/Coral_Harbour',
'America/Cordoba',
'America/Ensenada',
'America/Fort_Wayne',
'America/Godthab',
'America/Indianapolis',
'America/Jujuy',
'America/Knox_IN',
'America/Louisville',
'America/Mendoza',
'America/Montreal',
'America/Porto_Acre',
'America/Rosario',
'America/Santa_Isabel',
'America/Shiprock',
'America/Virgin',
'Antarctica/South_Pole',
'Asia/Ashkhabad',
'Asia/Calcutta',
'Asia/Chongqing',
'Asia/Chungking',
'Asia/Dacca',
'Asia/Harbin',
'Asia/Istanbul',
'Asia/Kashgar',
'Asia/Katmandu',
'Asia/Macao',
'Asia/Rangoon',
'Asia/Saigon',
'Asia/Tel_Aviv',
'Asia/Thimbu',
'Asia/Ujung_Pandang',
'Asia/Ulan_Bator',
'Atlantic/Faeroe',
'Atlantic/Jan_Mayen',
'Australia/ACT',
'Australia/Canberra',
'Australia/Currie',
'Australia/LHI',
'Australia/NSW',
'Australia/North',
'Australia/Queensland',
'Australia/South',
'Australia/Tasmania',
'Australia/Victoria',
'Australia/West',
'Australia/Yancowinna',
'Brazil/Acre',
'Brazil/DeNoronha',
'Brazil/East',
'Brazil/West',
'Canada/Saskatchewan',
'Canada/Yukon',
'Chile/Continental',
'Chile/EasterIsland',
'Europe/Belfast',
'Europe/Nicosia',
'Europe/Tiraspol',
'Mexico/BajaNorte',
'Mexico/BajaSur',
'Mexico/General',
'Pacific/Johnston',
'Pacific/Ponape',
'Pacific/Samoa',
'Pacific/Truk',
'Pacific/Yap',
'US/Aleutian',
'US/East-Indiana',
'US/Indiana-Starke',
'US/Michigan',
'US/Samoa'}
That's 17.6% of extra zones.
Please let me know if this actually matters or not.
master notable change f34