Timezone
Current local time, UTC offset and DST status.
GET
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
timezone | string | Optional | IANA timezone name (e.g. Asia/Dubai) |
lat | number | Optional | Latitude coordinate |
lng | number | Optional | Longitude coordinate |
city | string | Optional | City name |
country | string | Optional | ISO2 country code (use with city) |
Provide one of: timezone, lat/lng, or city/country.
Request Example
curl "https://api.localityapi.com/v1/timezone?timezone=Asia/Dubai" \
-H "X-API-Key: lapi_your_key"Response
json
{
"timezone": "Asia/Dubai",
"current_time": "2026-06-02 22:33:50",
"utc_offset": "UTC+04:00",
"dst_active": false,
"day_of_week": "Tuesday",
"query_ms": 0
}Response Fields
timezonestringIANA timezone identifiercurrent_timestringCurrent local time (YYYY-MM-DD HH:MM:SS)utc_offsetstringUTC offset (e.g. UTC+04:00)dst_activebooleanWhether DST is currently in effectday_of_weekstringCurrent day namequery_msintegerQuery execution time in milliseconds