Handle "special zones(eg: America/Montreal)" mentioned in checktab.awk
file of iana tz database
#176
Labels
checktab.awk
file of iana tz database
#176
@timrwood @mj1856 Need your attention on this one! And bare with me, this is going to be a long description.
The official IANA tzdata has a file by name
checktab.awk
. In this file, since 2013 (this commit : eggert/tz@2022cdd),there are entries that have been added for some timezones considered as "special cases".
Question: What is special about these zones?
Answer: These special zones are mentioned with a
tzdata["Some/zoneName"] = 1
harcoding in thechecktab.awk
file. The anomaly with these zones is that, their data is found in one of the continent files(africa, asia, america etc.) BUT they don't have an entry about their country mapping inzone1970.tab
. The country mapping for these zones is present inzone.tab
, which is supposed to deprecated and not used by newer applications.For example, in the latest tz database version 2014j, the
checktab.awk
file has following lines:Question: How does it affect timezone handling, or moment-timezone in general?
Answer: Moment-timezone has a
data-meta grunt task
which generates a map of countries and for each country, it has a array of zones followed in that country.For the above "special zones", they won't be mentioned in zones array of any country. Something like a zombie zone, which doesn't belong to any country, when in reality they all have a country in which they are followed.
Question: Which all versions of tzdata have these special zones?
Answer: Starting from 2013e onwards, these special zones make their appearance.
Question: Whats the deal with America/Montreal?
Answer: The America/Montreal zone is even more wierd, in that, this doesn't even have an entry in
zone.tab
file. Which leaves all consumers of tzdata with absolutely no clue, as to which country to associate with this zone. So, this needs to have an explicit country assigned to it, in thedata-meta
task. It belongs to Canada.You can read about a similar discussion on this issue here: tzinfo/tzinfo-data#2
Huh, thats probably one of the longest issue description in github!!! Phew!
Btw, i'm working on resolving this wierd problem and will send in a PR soon. Till then, jump in with your thoughts. I think we can handle this scenario in the grunt
data-meta
task.The text was updated successfully, but these errors were encountered: