Get Timezone
The get_timezone MCP tool returns the time zone, exact UTC offset, local time, and next known offset change for a pair of coordinates.
Use this tool when an AI assistant needs the local time at a place, the UTC offset at a given moment, or the date of the next daylight saving change. When the input is an address, call Geocode Address first and pass its coordinates.
Tool name
get_timezone
Request URL
https://api.geoapify.com/v1/mcp?apiKey=YOUR_API_KEY
Input parameters
| Name | Type | Required | Description |
|---|---|---|---|
lat |
number | Yes | Latitude of the location. Supported range: -90 to 90. |
lon |
number | Yes | Longitude of the location. Supported range: -180 to 180. |
at_unix_seconds |
integer | No | Instant as Unix time in whole seconds. Default: the current time. Supported dates: 2025-01-01 through 2031-12-31 UTC. |
The input schema does not allow additional properties.
Example request
This request asks for the time zone at Alexanderplatz in Berlin at 12:00 UTC on 11 November 2026:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "get_timezone",
"arguments": {
"lat": 52.5219,
"lon": 13.4132,
"at_unix_seconds": 1794398400
}
}
}
Response
The tool returns the coordinates, the resolved UTC instant in at, the time zone database version in tzdb_version, and a timezones array. Each item contains the IANA name, the offset type (standard, daylightSaving, or other), utc_offset, offset_seconds, abbreviation, local_time, and next_transition. A location on a time zone boundary can return more than one item.
next_transition describes the next known offset change: when it happens, the offsets before and after it, and its kind (daylight-start, daylight-end, offset-change, or designation-change). It is null when no change is known within the supported date range.
Example response
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"content": [
{
"type": "text",
"text": "{ ... }"
}
],
"structuredContent": {
"lat": 52.5219,
"lon": 13.4132,
"at": "2026-11-11T12:00:00.000Z",
"tzdb_version": "2026e",
"timezones": [
{
"name": "Europe/Berlin",
"type": "standard",
"utc_offset": "+01:00",
"offset_seconds": 3600,
"abbreviation": "CET",
"local_time": "2026-11-11T13:00:00.000+01:00",
"next_transition": {
"at": "2027-03-28T01:00:00.000Z",
"before": { "type": "standard", "utc_offset": "+01:00", "offset_seconds": 3600, "abbreviation": "CET" },
"after": { "type": "daylightSaving", "utc_offset": "+02:00", "offset_seconds": 7200, "abbreviation": "CEST" },
"offset_change_seconds": 3600,
"kind": "daylight-start"
}
}
]
},
"isError": false
}
}
Related tools
- Geocode Address - convert an address into coordinates.
- Reverse Geocode Coordinates - find the address or place at the same coordinates.
Related API
For direct HTTP API integration, see Timezone API.