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
Response
Timezone successfully retrieved
timezone
string required
timezone_name
string required
raw_offset
integer required
dst_offset
integer required
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"
}