Endpoint
Authentication
| Header | Required | Value |
|---|---|---|
X-API-Key | Yes | Your API key (bun_...) |
Content-Type | Yes | application/json |
Overview
Retrieve current timezone details by providing an IANA timezone identifier or a pair of geographic coordinates. The response includes the UTC offset, DST status, and the current local time at that location. UseGET /timezone/list to retrieve all supported IANA timezone IDs.
Use cases
- Display localized timestamps in scheduling and calendar applications
- Normalize log timestamps from distributed systems to a single reference zone
- Determine the local time at a destination for travel applications
- Localize time-sensitive UI elements such as countdowns and business hours
Request body
Provide eithertimezone (IANA ID) or both lat and lon (coordinates).
| Field | Type | Required | Description |
|---|---|---|---|
timezone | string | No | IANA timezone identifier (e.g. "America/Sao_Paulo") |
lat | number | No | Latitude for coordinate-based lookup |
lon | number | No | Longitude for coordinate-based lookup |
Example — by IANA ID
Example — by coordinates
Response
200 OK
| Field | Type | Description |
|---|---|---|
timezone | string | IANA timezone identifier |
abbreviation | string | Timezone abbreviation (e.g. "BRT") |
utc_offset | string | UTC offset string (e.g. "-03:00") |
utc_offset_minutes | integer | UTC offset in minutes |
current_local_time | string | Current local time in ISO 8601 format |
observes_dst | boolean | Whether the timezone currently observes daylight saving time |

