Timezone

GET
https://api.woosmap.com/geolocation/timezone

Returns timezone information based on the location, and optionally a timestamp for daylight saving time.

Note: rawOffset never contains the dst.

Authorization

key
apiKey query

A Public key generated specifically to authenticate API requests on the front side. See how to register a Public API Key.

Referer
apiKey header

The Referer HTTP request header is mandatory when using PublicApiKeyAuth. In browser environment, the Referer is set by the browser itself and cannot be overridden.

private_key
apiKey query

A Private key generated specifically to authenticate API requests on server side. Required for Data management API. See how to register a Private API Key.

X-Api-Key
apiKey header

A Private key to authenticate API requests through the Header instead of Query parameter. Use either PrivateApiKeyHeaderAuth or PrivateApiKeyAuth. See how to register a Private API Key.

Query Parameters

location
string required

The location {lat},{lng}

timestamp
integer

The UTC timestamp

Response

200 application/json

Timezone successfully retrieved

timezone
string required

The time zone identifier eg. 'Europe/Paris'. see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

timezone_name
string required

The timezone name eg. PDT

raw_offset
integer required

offset from utc in seconds.

dst_offset
integer required

The daylight saving time offset in seconds.

Errors

401

Unauthorized. Incorrect authentication credentials.

application/json
detail
string

Details for the credentials error

Example: Incorrect authentication credentials. Please check or use a valid API Key
403

Forbidden. This Woosmap API is not enabled for this project.

application/json
detail
string

Details for the forbidden error message

Example: This Woosmap API is not enabled for this project.
429

Too Many Requests. The rate limit for this endpoint has been exceeded.

application/json
detail
string

Details for the Over Query Limit error message

Example: The rate limit for this endpoint has been exceeded
        curl -L 'https://api.woosmap.com/geolocation/timezone?private_key=YOUR_PRIVATE_API_KEY&location=43.6114130%2C3.8735291'

    
        const requestOptions = {
  method: "GET",
  redirect: "follow"
};

fetch("https://api.woosmap.com/geolocation/timezone?private_key=YOUR_PRIVATE_API_KEY&location=43.6114130%2C3.8735291", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));

    
        import requests

url = "https://api.woosmap.com/geolocation/timezone?private_key=YOUR_PRIVATE_API_KEY&location=43.6114130%2C3.8735291"

payload = {}
headers = {}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)


    
        
{
"timezone": "Europe/Paris",
"timezone_name": "CEST",
"raw_offset": 3600,
"dst_offset": 3600
}
        
{
"detail": "Incorrect authentication credentials. Please check or use a valid API Key"
}
        
{
"detail": "This Woosmap API is not enabled for this project."
}
        
{
"detail": "The rate limit for this endpoint has been exceeded"
}
Was this helpful?