Why coordinates need a timezone lookup
Latitude and longitude identify a position, but they do not say what the local clock should read. A timezone lookup maps the position to a named timezone that carries its full daylight-saving history.
1. Call the timezone API
Send lat and lon. Both parameters are required.
API
Find a timezone from coordinates
GET /v1/timezone?lat=51.5033635&lon=-0.1276248curl -H "X-API-Key: YOUR_MAPSI_API_KEY" \
"https://mapsi.dev/v1/timezone?lat=51.5033635&lon=-0.1276248"const response = await fetch(
"https://mapsi.dev/v1/timezone?lat=51.5033635&lon=-0.1276248",
{ headers: { "X-API-Key": "YOUR_MAPSI_API_KEY" } }
);
const data = await response.json();
console.log(data.timezone); // "Europe/London"import requests
response = requests.get(
"https://mapsi.dev/v1/timezone",
params={"lat": 51.5033635, "lon": -0.1276248},
headers={"X-API-Key": "YOUR_MAPSI_API_KEY"},
)
data = response.json()
print(data){
"success": true,
"coordinates": {
"lat": 51.5033635,
"lon": -0.1276248
},
"timezone": "Europe/London",
"utc_offset": "+00:00",
"dst": true,
"current_time": "Monday, September 28, 2026 at 5:11:56 PM GMT+1"
}2. Use the IANA timezone name
Use the timezone value with any timezone-aware date library. Do not try to work it out
from longitude: real boundaries follow borders and political decisions, not longitude lines. The
response also includes utc_offset and a dst flag for the moment of the
request.
const timezone = data.timezone;
// "Europe/London"
new Date().toLocaleString("en-GB", { timeZone: timezone }); 3. Build local-time features
Store timestamps in UTC and keep the IANA name alongside them. With that you can show local times, schedule notifications at a sensible local hour, group events by local date and convert UTC values into the user's local time. Store the name rather than the offset, because offsets change with daylight saving.