Server-Synchronised Time
Use a server timestamp as the instant, then apply real IANA timezone rules instead of trusting a visitorβs device clock.
Build powerful time, timezone, location, calendar, sunrise, sunset and astronomical applications with WorldClock data.
curl -s 'https://worldclock.to/api/v1/time?timezone=Asia/Karachi'{
"success": true,
"data": {
"timezone": "Asia/Karachi",
"utc_offset": "+05:00",
"abbreviation": "PKT",
"local_time": "2026-09-09T14:30:00+05:00",
"date": "2026-09-09",
"time": "14:30:00",
"unix": 1788946200,
"dst": false,
"city": "Karachi",
"country": "Pakistan"
},
"meta": {
"version": "v1",
"timezone": "Asia/Karachi",
"timestamp": 1788946200
}
}Website tools, widgets and API responses share the same bundled locations, IANA timezone logic and WorldClock astronomical calculation methodology.
Use a server timestamp as the instant, then apply real IANA timezone rules instead of trusting a visitorβs device clock.
Conversions are performed for the requested date, so daylight-saving transitions are not treated as fixed UTC offsets.
The public API does not depend on another time, timezone, sunrise or moon provider to answer core requests.
The v1 response contract is isolated so a future v2 can evolve without silently breaking existing integrations.
/api/v1/timeReturn the server-synchronised current instant in an IANA timezone, city or country.
Read docs β/api/v1/timezoneInspect an IANA timezone, UTC offset, abbreviation and daylight-saving state.
Read docs β/api/v1/convertConvert a local date/time between IANA zones using the rules that apply on that date.
Read docs β/api/v1/citiesSearch, locate and paginate the bundled WorldClock city directory.
Read docs β/api/v1/city/{city}Return location, timezone, exact local time, sunrise and sunset for one city.
Read docs β/api/v1/countriesList countries and territories in the WorldClock directory.
Read docs β/api/v1/country/{country}Return country, capital, geographic region, timezones and bundled cities.
Read docs β/api/v1/sunCalculate sunrise, sunset, twilight, solar noon and day length from coordinates.
Read docs β/api/v1/moonCalculate moon phase, illumination, lunar age and approximate moonrise/moonset.
Read docs β/api/v1/unixConvert Unix timestamps, UTC and local ISO 8601 dates.
Read docs β/api/v1/calendarReturn calendar facts for a date in a timezone.
Read docs β/api/v1/formatFormat an instant using safe named presets in any IANA timezone.
Read docs βCall a versioned /api/v1/β¦ endpoint with validated query parameters.
Timezone, location and astronomy engines resolve the requested data.
Success, data and meta follow the same structure across v1.
Try the current time in Karachi. The returned local time is generated at request time; the documentation sample is illustrative, not hard-coded live data.
Open API Explorerfetch('https://worldclock.to/api/v1/time?timezone=Asia/Karachi')
.then(r => r.json())
.then(console.log);Show exact local time across offices and markets.
Resolve DST-aware meeting and appointment times.
Show destination time, sun data and local calendar context.
Power team clocks and timezone-aware collaboration.
Convert dates, Unix timestamps and local time safely.
Display local event times without fixed-offset mistakes.
Normalize timestamps across regions and handoffs.
Add clocks, timers and timezone context to workflows.
The public API exposes the same bundled location database, IANA timezone rules and astronomical calculations used by the site itself. It is designed for dashboards, scheduling tools, travel applications, calendars and other software that needs dependable time data.
A versioned JSON interface to WorldClock time, timezone, location and astronomy calculations.
The current configuration exposes developer access without a paid plan. The administrator can require API keys and change fair-use limits later without changing endpoint URLs.
IANA timezone identifiers and the timezone rules available to the WordPress/PHP runtime are used for current offsets and date-specific DST conversion.
Yes. The source local datetime is interpreted in its IANA zone and converted as an absolute instant, rather than by adding a hard-coded offset.
The API returns HTTP 429 with a consistent RATE_LIMIT_EXCEEDED error object.
Cache location and country directory data longer than live time responses. Exact current-time responses should be treated as point-in-time data and refreshed according to your product needs.
Test parameters in your browser, then copy the same request into your application.