GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Country code + region code --> Timezone  XML
Forum Index -> General
Author Message

Joined: 29/11/2020 23:34:10
Messages: 1


How is it possible to get the timezone for a "country code + region code" pair?
(also known as ISO3166-1 alpha2 and ISO3166-2)


ISO3166 -> Timezone

DE-BE -> Europe/Berlin
AU-TAS -> Australia/Hobart or Australia/Tasmania
US-NY -> America/NewYork

Thank you in advance,

Joined: 28/11/2020 11:56:56
Messages: 4


The timezone information is included in the location information. Unfortunately it is not currently possible to use the web-based search for such a detailed query. However, you can get the information through the web services, but it requires a bit of coding still, as the ISO3166-2 code is provided by the data, but unfortunately cannot be used as a search criteria.

Read the following documentation:

Which would lead to the conclusion, that you could query the information you need with the following search:
- It must be a first order administration entry (ADM1)
- In country {ISO3166-1 alpha2}

The query template would look like this:{ISO3166-1 alpha2}&style=full&username=demo

Hence, the query would look like this for your first example:

Then you will have to go through the results and search for Code:
<adminCode1 ISO3166-2="{ISO3166-2}">
(xml) or Code:

In XML, you could do that with just an XQuery Code:
(eg. Code:

Hope that helps!
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team