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"
}
Property | Type | Description |
---|---|---|
id | String | The timezone ID. |
title | String | The title of the timezone. |
utc_offset | Integer | The difference in seconds between Coordinated Universal Time (UTC) and the timezone. |
country_id | String | The 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"
},
...
]