Getting Started
This page will guide you through making your first time zone conversion with OpenTimezone.
OpenTimezone uses a simple conversion endpoint:
https://api.opentimezone.com/convert
By sending a POST request with a date/time, a source time zone, and a target time zone, you can convert times between supported time zones.
OpenTimezone also provides helper endpoints for listing supported time zones, looking up a specific time zone, and searching time zone abbreviations.
Available endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /convert | Convert a date/time from one time zone to another. |
GET | /timezones | List all supported time zones. |
GET | /timezone/{timezoneId} | Get details for a specific time zone. |
GET | /timezones/abbreviations | List known time zone abbreviations. |
GET | /timezones/abbreviations/search | Search for time zones by abbreviation. |
Step 1: Convert UTC to New York time
Below is a minimal example of how to convert a UTC date/time to New York time.
View cURL request
curl -X 'POST' \
'https://api.opentimezone.com/convert' \
-H 'Content-Type: application/json' \
-d '{
"dateTime": "2026-06-15T03:02:22.1771394",
"fromTimezone": "UTC",
"toTimezone": "America/New_York"
}'
Example response
{
"dateTime": "2026-06-14T23:02:22.1771394"
}
Step 2: Convert New York time to UTC
You can also convert local time back to UTC.
View cURL request
curl -X 'POST' \
'https://api.opentimezone.com/convert' \
-H 'Content-Type: application/json' \
-d '{
"dateTime": "2026-06-14T23:02:22.1771971",
"fromTimezone": "America/New_York",
"toTimezone": "UTC"
}'
Example response
{
"dateTime": "2026-06-15T03:02:22.1771971"
}
Step 3: Convert between two local time zones
OpenTimezone can convert directly between two local time zones.
View cURL request
curl -X 'POST' \
'https://api.opentimezone.com/convert' \
-H 'Content-Type: application/json' \
-d '{
"dateTime": "2026-06-14T23:02:22.1772092",
"fromTimezone": "America/New_York",
"toTimezone": "Europe/London"
}'
Example response
{
"dateTime": "2026-06-15T04:02:22.1772092"
}
Step 4: List all supported time zones
Use the /timezones endpoint to retrieve the list of supported time zones.
View cURL request
curl -X 'GET' \
'https://api.opentimezone.com/timezones'
Example response
The response contains all supported time zones. This excerpt shows one item from the live API response.
[
{
"id": "Europe/London",
"displayName": "(UTC+00:00) Europe/London",
"baseOffset": "00:00:00"
}
]
Step 5: Look up a specific time zone
Use /timezone/{timezoneId} to retrieve information about a single time zone.
View cURL request
curl -X 'GET' \
'https://api.opentimezone.com/timezone/Europe%2FLondon'
Example response
{
"id": "Europe/London",
"displayName": "(UTC+00:00) Europe/London",
"baseOffset": "00:00:00"
}
Step 6: Explore time zone abbreviations
OpenTimezone can also return known time zone abbreviations.
View cURL request
curl -X 'GET' \
'https://api.opentimezone.com/timezones/abbreviations'
Example response
The response contains all known abbreviation groups. This excerpt shows the first few entries from the live API response.
{
"abbreviations": [
{
"abbreviation": "SST",
"utcOffset": "-11:00:00",
"timezoneIds": [
"Pacific/Midway",
"Pacific/Pago_Pago"
]
},
{
"abbreviation": "-11",
"utcOffset": "-11:00:00",
"timezoneIds": [
"Pacific/Niue"
]
},
{
"abbreviation": "HST",
"utcOffset": "-10:00:00",
"timezoneIds": [
"America/Adak",
"Pacific/Honolulu"
]
}
]
}
Step 7: Search by abbreviation
Use /timezones/abbreviations/search to search for time zones by abbreviation.
The includeNumeric query parameter controls whether numeric-style abbreviations, such as -05:00:00, are included in the result.
View cURL request
curl -X 'GET' \
'https://api.opentimezone.com/timezones/abbreviations/search?abbreviation=EST&includeNumeric=true'
Example response
{
"abbreviations": [
{
"abbreviation": "EST",
"utcOffset": "-05:00:00",
"timezoneIds": [
"America/Atikokan",
"America/Cancun",
"America/Cayman",
"America/Detroit",
"America/Grand_Turk",
"America/Indiana/Indianapolis",
"America/Indiana/Marengo",
"America/Indiana/Petersburg",
"America/Indiana/Vevay",
"America/Indiana/Vincennes",
"America/Indiana/Winamac",
"America/Iqaluit",
"America/Jamaica",
"America/Kentucky/Louisville",
"America/Kentucky/Monticello",
"America/Nassau",
"America/New_York",
"America/Panama",
"America/Port-au-Prince",
"America/Toronto"
]
}
]
}