Timezone API

Getting timezone information of a location: Timezone API

The /timezone endpoint provides the following timezone information of a place or an address:

  1. The Daylight Savings Time (DST) offset in seconds (or 0 if no daylight savings time is in effect).
  2. The offset in seconds from UTC for the given location.
  3. The id of the timezone, e.g. “Australia/Brisbane” as defined by the Unicode Common Locale Data Repository (CLDR).

Please note that the place or the address should be in the form of latitude and longitude coordinates in the request. Also, the timezone data may not be available for locations over waterbodies such as oceans or seas.

Mandatory parameters

  1. location: The location specifies a set of latitude and longitude of the place to find the timezone for. It is a comma-separated latitude, longitude coordinates representing the location to look up.

  2. timestamp: The timestamp specifies the time in seconds that should be used to calculate the current DST offset for the timezone.

For example, let’s say you want to get the timezone information of Brisbane, Australia. For this you can first use the /geocode endpoint to get the latitude and longitude coordinates of Brisbane and then use them to send a GET request by calling the /timezone endpoint with the following query:

 https://<base URL>/geoservices/timezone?location=-27.446208%2C153.003657&timestamp=1550296942

This request returns the following timezone information of Brisbane:

{
    "dstOffset": 0,
    "rawOffset": 36000.0,
    "timeZoneId": "Australia/Brisbane"
}

For the schema information of this endpoint, please refer to /timezone.