Time Sync API

Use this API to fetch comprehensive date and time details for a given timezone. Requests are rate-limited to maintain fair usage and service stability.

Example for Pacific/Auckland

Usage

Send a GET request to the following endpoint: /api?timezone=Pacific/Auckland

Parameters

Response Example

{
  "local_time": "2025-01-25T11:03:53.062+13:00",
  "utc_time": "2025-01-24T22:03:53.062Z",
  "timezone": "Pacific/Auckland",
  "offset": "GMT+13",
  "offset_minutes": 780,
  "timezone_abbreviation": "+1300",
  "day_of_week": "Saturday",
  "ordinal_date": "25",
  "iso_week": 4,
  "iso_year": 2025,
  "days_in_month": 31,
  "days_in_year": 365,
  "is_leap_year": false,
  "start_of_day": "2025-01-25T00:00:00.000+13:00",
  "end_of_day": "2025-01-25T23:59:59.999+13:00",
  "timestamp_milliseconds": 1737756233062
}
      

Response Fields

Field Description
local_time The current local time in the specified timezone (ISO 8601 format).
utc_time The current Coordinated Universal Time (UTC) in ISO 8601 format.
timezone The IANA timezone identifier provided in the request.
offset The UTC offset of the specified timezone (e.g., UTC+13:00).
offset_milliseconds The UTC offset in milliseconds for the specified timezone.
timezone_abbreviation The abbreviation of the timezone (e.g., GMT+13).
day_of_week The current day of the week in the specified timezone.
iso_week_number The ISO week number for the current date in the specified timezone.
timestamp_milliseconds The Unix timestamp in milliseconds for the current time in the specified timezone.

Error Responses

{
  "error": "Missing 'timezone' query parameter."
}

{
  "error": "Invalid timezone provided."
}
      

List of Supported Timezones

The following is a comprehensive list of all supported IANA timezones:

// Loading timezones...