JSON Dictionary for Mapping Timezone Cities to Countries

In my blog post get user country and region on browser with JavaScript only, I explained how to generate and use a dictionary to map timezone cities to their countries. Below are the complete JSON dictionaries, 1. cities (region part removed) to countries and 2. full timezones (with regions and cities) to countries, that can be copied or downloaded:

Notice that the keys “Kolkata” and “Calcutta” are both present and map to India. The reason is that “Kolkata” is what you find in moment-timezone, whereas selecting any Indian timezone returns me the spelling “Calcutta”. Therefore, I’ve kept both.

[Read More]
json 
When you purchase through links on techighness.com, I may earn an affiliate commission.