Resources

Timezones

The API uses structured timezone data for all timestamped computations.


The Timezone object

// timezone object
{
  "id": "America\/Chicago",
  "title": "America, Chicago",
  "utc_offset": -18000,
  "country_id": "US"
}
PropertyTypeDescription
idStringThe timezone ID.
titleStringThe title of the timezone.
utc_offsetIntegerThe difference in seconds between Coordinated Universal Time (UTC) and the timezone.
country_idStringThe country identifier the timezone is located.

Read timezone

Retrieves the timezone object for the current session.account.

Request

GET /v1/static/timezone

Response

The Timezone object.

// timezone object
{
  "id": "America\/Chicago",
  "title": "America, Chicago",
  "utc_offset": -18000,
  "country_id": "US"
}

Enumerated timezones

Provides an enumerated collection of timezone data for HTML selects, radios, or similar listing elements.

Timezones are provided for the country of the current session.account.

Request

GET /v1/static/timezones/enumerated

Response

[
  {
    "id": "America\/Chicago",
    "title": "America, Chicago"
  },
  ...
]

Optionally, provide a custom value for the id and/or title property names in the query. In the example request, the response property names have been changed to value and label to eliminate mapping requirements in the frontend codebase.

Request

GET /v1/static/timezones/enumerated
?id=value&title=label

Response

[
  {
    "value": "America\/Chicago",
    "label": "America, Chicago"
  },
  ...
]
Previous
Countries
Next
User