Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Getting a list of linked zones for a country #60
Hi, recently we switched to using
However, without using
This might the intended behaviour, because in IANA database
So my question is, is there a way to list original names of the time zones for a country, instead of jumping to the linked ones?
What you are seeing is the intended behaviour. It is actually caused by the definitions in the IANA Time Zone Database, not because
I suspect that your system doesn't include the newer
The intention of the IANA Time Zone Database coordinator appears to be to stop distributing
TZInfo::Timezone.all_linked_zones.find_all do |z| z.canonical_zone.identifier == 'Europe/Belgrade' end
However, you would need to use a separate source of data to determine which country the identifiers of the returned zones relate to.
It sounds like you are having users select a time zone by country and then zone identifier. If this is the case then, for countries that only have a single time zone (like Croatia), I'd suggest not showing a list of zone identifiers and automatically selecting the only available option.