LocalityAPI
Get API Key

Timezone

Current local time, UTC offset and DST status.

GET

Parameters

ParameterTypeRequiredDescription
timezonestringOptionalIANA timezone name (e.g. Asia/Dubai)
latnumberOptionalLatitude coordinate
lngnumberOptionalLongitude coordinate
citystringOptionalCity name
countrystringOptionalISO2 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 identifier
current_timestringCurrent local time (YYYY-MM-DD HH:MM:SS)
utc_offsetstringUTC offset (e.g. UTC+04:00)
dst_activebooleanWhether DST is currently in effect
day_of_weekstringCurrent day name
query_msintegerQuery execution time in milliseconds