Source: https://developers.woosmap.com/api-reference/geolocation-api/get-geolocation-timezone/

> For clean Markdown of any page, append `.md` to the page URL.

> For a complete documentation index, see https://developers.woosmap.com/llms.txt

# Timezone



# 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`](#authorization-woosmap-platform-api-reference-publicapikeyauth)
apiKeyquery

A Public key generated specifically to authenticate API requests on the front side. See how to [register a Public API Key](https://developers.woosmap.com/api-reference/authentication/#registering-a-woosmap-public-api-key).

[`Referer`](#authorization-woosmap-platform-api-reference-refererheader)
apiKeyheader

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`](#authorization-woosmap-platform-api-reference-privateapikeyauth)
apiKeyquery

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](https://developers.woosmap.com/api-reference/authentication/#registering-a-woosmap-private-api-key).

[`X-Api-Key`](#authorization-woosmap-platform-api-reference-privateapikeyheaderauth)
apiKeyheader

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](https://developers.woosmap.com/api-reference/authentication/#registering-a-woosmap-private-api-key).

### Query Parameters

[`location`](#query-location)
stringrequired

The location {lat},{lng}

[`timestamp`](#query-timestamp)
integer

The UTC timestamp

### Response

200application/json

Timezone successfully retrieved

[`timezone`](#resp-200-timezone)
stringrequired

The time zone identifier eg. 'Europe/Paris'. see [https://en.wikipedia.org/wiki/List\_of\_tz\_database\_time\_zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)

[`timezone_name`](#resp-200-timezone-name)
stringrequired

The timezone name eg. `PDT`

[`raw_offset`](#resp-200-raw-offset)
integerrequired

offset from utc in seconds.

[`dst_offset`](#resp-200-dst-offset)
integerrequired

The daylight saving time offset in seconds.

### Errors

#401

Unauthorized. Incorrect authentication credentials.

 

`application/json`

[`detail`](#err-401-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`](#err-403-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`](#err-429-detail)
string

Details for the Over Query Limit error message

Example:`The rate limit for this endpoint has been exceeded`

```shell
curl -L 'https://api.woosmap.com/geolocation/timezone?private_key=YOUR_PRIVATE_API_KEY&location=43.6114130%2C3.8735291'
```

```javascript
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));
```

```python
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)
```

```json
{
  "timezone": "Europe/Paris",
  "timezone_name": "CEST",
  "raw_offset": 3600,
  "dst_offset": 3600
}
```

```json
{
  "detail": "Incorrect authentication credentials. Please check or use a valid API Key"
}
```

```json
{
  "detail": "This Woosmap API is not enabled for this project."
}
```

```json
{
  "detail": "The rate limit for this endpoint has been exceeded"
}
```
