Open KevinNovak opened 3 years ago
The group name should definitely be the main time zone name indeed, not the deprecated ones. I guess I missed that when I initially built the library.
Accepting PR solving this, thanks!
There are 3 sort of statuses a time zone name can be in (Wikipedia).
Canonical - The primary, preferred zone name. Alias - An alternative name, which may fit better within a particular country. Deprecated - An older style name, left in the tz database for backwards compatibility, which should generally not be used.
tzdb would need to be able to determine what status a name is in for this change, so I tried to hunt down how Wikipedia determined these statuses.
It seems that everything originates from the IANA Time Zone Database, and more specifically:
deprecated time zones - Come from the "backward" file.
alias time zones - Come from each of the individual region files (such as "africa", "europe", etc.).
Based on IANA's download suggestions, we should be able to download the data with the following commands:
wget https://www.iana.org/time-zones/repository/tzdata-latest.tar.gz
gzip -dc tzdata-latest.tar.gz | tar -xf -
It's also available directly through HTTPS here.
I imagine the tzdb's generate.js
could download this data and use it where needed:
According to the The Wikipedia list of IANA time zones, the "America/Godthab" time zone has been deprecated and should be replaced with "America/Nuuk".
I noticed tzdb is using "America/Godthab" as one of the main time zone names.
EDIT: I noticed "Africa/Lome" is being used as the main name of the time zone group, even though it is an alias for "Africa/Abidjan".
I guess the question is, should deprecated time zone names be used as main group names? And secondly, should alias names be used as main group names? Should the group name not be the canonical one?