Skip to content
Endpoint reference ยท v1

Time Zone API

Inspect an IANA timezone, UTC offset, abbreviation and daylight-saving state.

GET/api/v1/timezone

What It Does

Inspect an IANA timezone, UTC offset, abbreviation and daylight-saving state.

HTTP method
GET
Authentication
Public read-only; Bearer keys supported
Version
v1

Parameters

NameTypeRequiredDescription
zonestringYesIANA timezone identifier.
Example: America/New_York

Request Examples

cURL
curl -s 'https://worldclock.to/api/v1/timezone?zone=America/New_York'
JavaScript
const response = await fetch("https:\/\/worldclock.to\/api\/v1\/timezone?zone=America\/New_York");
const result = await response.json();
console.log(result.data);
PHP
$response = wp_remote_get('https://worldclock.to/api/v1/timezone?zone=America/New_York');
 = json_decode(wp_remote_retrieve_body(), true);
Python
import requests

response = requests.get("https:\/\/worldclock.to\/api\/v1\/timezone?zone=America\/New_York")
response.raise_for_status()
print(response.json()["data"])

Example Response

The values below illustrate the response shape. Live current-time fields are generated dynamically by the endpoint.

JSON
{
    "success": true,
    "data": {
        "timezone": "America/New_York",
        "region": "America",
        "location": "New York",
        "utc_offset": "-04:00",
        "standard_offset": "-05:00",
        "standard_offset_seconds": -18000,
        "daylight_offset": "-04:00",
        "daylight_offset_seconds": -14400,
        "abbreviation": "EDT",
        "dst": true,
        "current_local_time": "2026-09-09T05:30:00-04:00",
        "country": "United States",
        "countries": [
            {
                "name": "United States",
                "code": "US",
                "slug": "united-states"
            }
        ]
    },
    "meta": {
        "version": "v1",
        "timezone": "America/New_York",
        "timestamp": 1788946200
    }
}

Response Properties

Every successful response contains success: true, endpoint-specific data, and a meta object. The table below documents the public fields for this endpoint.

PropertyMeaning
successBoolean indicating whether the request completed successfully.
meta.versionPublished API response version.
meta.timestampUnix timestamp for the API response instant.
meta.timezoneTimezone context used by the response.
meta.rate_limitPer-client fair-use limit and remaining-request information on public transports.
data.timezoneRequested IANA timezone identifier.
data.regionTop-level IANA region, such as America or Asia.
data.locationReadable location portion of the IANA identifier.
data.utc_offsetOffset currently in effect.
data.offset_secondsCurrent UTC offset in seconds.
data.standard_offsetStandard-time UTC offset inferred from IANA rules.
data.standard_offset_secondsThe same standard offset in seconds.
data.daylight_offsetDaylight-time offset where the zone uses DST.
data.daylight_offset_secondsThe same daylight offset in seconds.
data.abbreviationCurrent timezone abbreviation.
data.dstWhether DST is active now.
data.current_local_timeCurrent local ISO 8601 time.
data.countryCountry name when the zone maps uniquely to one bundled country.
data.countriesBundled country objects that use the timezone.
data.countries[].nameCountry display name.
data.countries[].codeTwo-letter country code.
data.countries[].slugCountry slug.

Errors use success: false with a stable machine-readable error code and a safe human-readable message.

Errors & HTTP Status Codes

  • 400 โ€” invalid or missing parameter.
  • 401 โ€” API key required or invalid when key-only access is enabled.
  • 404 โ€” unknown city, country or endpoint.
  • 429 โ€” configured rate limit reached.
  • 503 โ€” API disabled or maintenance mode.

Rate Limits & Caching

Current fair-use configuration is 60 requests per minute and 5000 requests per day. Cache stable directory/calculation responses where appropriate; treat current-time output as point-in-time data.

Related Endpoints