https://time.abstractapi.com/v1/convert_time
? api_key = YOUR_API_KEY
& location = Oxford, United Kingdom
{
"requested_location": "Oxford, United Kingdom",
"longitude": -1.257677,
"latitude": 51.752022,
"datetime": "2020-07-01 14:22:13",
"timezone_name": "British Summer Time",
"timezone_abbreviation": "BST",
"gmt_offset": "+1",
"is_dst": true
}
starter
$9
per
month
pro
$49
per
month
growth
$99
per
month
The Time, Date, and Timezone API is the easiest way to find, convert, and manage time and timezone data across the world. You can enter a location or IP address to get that location's current time, date, and timezone, as well as convert one timezone into another, either now or in the future.
The Time, Date, and Timezone API API, like all of Abstract's APIs, is organized around REST. It is designed to use predictable, resource-oriented URL's and to use HTTP status codes to indicate errors.
The Time, Date, and Timezone API requires all communications to be secured TLS 1.2 or greater.
All of Abstract's API are versioned. The Time, Date, and Timezone API is currently on Version 1.
Your API key is your unique authentication key to be used to access Abstract's Exchange Rate API. Note that each of Abstract's API has a unique API key, so you will need different keys to access the Time, Date, and Timezone and IP Geolocation API or VAT validation API for example. To authenticate your requests, you will need to append your API key to the base URL.
https://time.abstractapi.com/v1/
Abstract's Time, Date, and Timezone API contains two main endpoints for accessing and manipulating timezone data:
The /current_time/ endpoint take a location in the form of a location name, latitude and longitude, or IP address and returns the current time, date, and timezone of that location.
https://time.abstractapi.com/v1/convert_time
? api_key = YOUR_API_KEY
& location = Oxford, United Kingdom
This was a successful request, and the details below are included in the response:
{
"requested_location": "Oxford, United Kingdom",
"longitude": -1.257677,
"latitude": 51.752022,
"datetime": "2020-07-01 14:22:13",
"timezone_name": "British Summer Time",
"timezone_abbreviation": "BST",
"gmt_offset": "+1",
"is_dst": true
}
PARAMETER
TYPE
DETAILS
api_key required
String
Your unique API key. Note that each user has unique API keys for each of Abstract's APIs, so your Time, Date, and Timezone API key will not work for as your User Avatar API key, for example.
location required
String
The location to determine the current time and timezone of. This parameter accepts the location as a string (e.g., "Los Angeles, CA"), a longitude and latitude, or an IP address.
PARAMETER
TYPE
DETAILS
requested_location
String
The location from the request.
longitude
Float
Decimal of the longitude found for the requested_location.
latitude
Float
Decimal of the longitude found for the requested_location.
datetime
String
The current date and time of the requested_location.
timezone_name
String
Timezone's name from the IANA Time Zone Database.
timezone_abbreviation
String
Timezone's abbreviation, also from the IANA Time Zone Database.
gmt_offset
String
Timezone's offset from Greenwich Mean Time (GMT).
is_dst
Boolean
True if the location is currently in Daylight Savings Time (DST).
The /convert_time/ endpoint makes it easy to convert the time and date of a given location to the time and date of another location. By default it converts the current time, but the conversion can take place in either the past or future with a simple parameter.
Below is a sample request to get the local time in Oxford in the United Kingdom when it is 7:00 AM on May 1, 2020 in Los Angeles, California.
https://time.abstractapi.com/v1/convert_time
? api_key = YOUR_API_KEY
& base_location = Los Angeles, CA
& base_datetime = 2020-05-01 07:00:00:00
& target_location = Oxford, United Kingdom
This was a successful request, and returns both datetime and timezone data for the base location (Los Angeles) and the target location (Oxford).
{
"base_location": {
"requested_location": "Los Angeles, CA",
"longitude": -118.243683,
"latitude": 34.052235,
"datetime": "2020-05-01 07:00:00",
"timezone_name": "Pacific Standard Time",
"timezone_abbreviation": "PST",
"gmt_offset": "-8",
"is_dst": true
},
"target_location": {
"requested_location": "Oxford, United Kingdom",
"longitude": -1.257677,
"latitude": 51.752022,
"datetime": "2020-07-01 15:00:00",
"timezone_name": "British Summer Time",
"timezone_abbreviation": "BST",
"gmt_offset": "+1",
"is_dst": true
}
}
PARAMETER
TYPE
DETAILS
api_key required
String
Your unique API key. Note that each user has unique API keys for each of Abstract's APIs, so your VAT Validation API key will not work for as your IP Geolocation API key, for example.
base_location required
String
It can either be a location like `Paris` or a long lat coordinate
base_datetime required
String
The current datetime you're converting
target_location required
String
The location you want to get the datetime for like `Chicago`
PARAMETER
TYPE
DETAILS
base_location
Object
The JSON Object containing the time and timezone details of the base location from the request.
target_location
Object
The JSON Object containing the time and timezone details of the target location from the request.
base_location / target_location > requested_location
String
The location from the request.
base_location / target_location > longitude
Float
Decimal of the longitude found for the requested_location.
base_location / target_location > latitude
Float
Decimal of the longitude found for the requested_location.
base_location / target_location > datetime
String
The current date and time of the requested_location.
base_location / target_location > timezone_name
String
Timezone's name from the IANA Time Zone Database.
base_location / target_location > timezone_abbreviation
String
Timezone's abbreviation, also from the IANA Time Zone Database.
base_location / target_location > gmt_offset
String
Timezone's offset from Greenwich Mean Time (GMT).
base_location / target_location > is_dst
Boolean
True if the location is currently in Daylight Savings Time (DST).
Whenever you make a request that fails for some reason, an error is returned also in the JSON format. The errors include an error code and description, which you can find in detail below.
CODE
TYPE
DETAILS
200
OK
Everything worked as expected.
400
Bad request
Bad request
401
Unauthorized
The request was unacceptable. Typically due to the API key missing or incorrect.
500
Internal Server Error
The request could not be completed due to an error on the server side.
503
Service Unavailable
The server was unavailable.
Abstract’s Time, Date, and Timezone API is a simple, powerful, and lightweight REST API that can identify the current time, timezone, and other details from a given location (via the /current_time API endpoint), or convert the time from one location to another at the current time or at some point in the past or future (via the /convert_time endpoint).
For example, using the /current_time endpoint, you could request the current time of "Los Angeles, CA" or of the longitude and latitude of -118.243683 / 34.052235 (also of Los Angeles) or a given IP address, and the IP would return the current time, timezone, and other details for that location.
Similarly, using the /convert_time endpoint, you should submit "Los Angeles, CA", a time in the past, present, or future, and "Paris, FR", and the API would return what the time will be in Paris, France when it is the specified time in Los Angeles, CA.
We see a wide variety of uses cases for the Time, Date, and Timezone API across many industries and countries around the world. Any time you are interacting with a user in a different location than yours, it's best to understand what time of day it is there and interact with them appropriately as a result of that. Similarly, you may want that information of the time in your location reflected back to your users. For example, say you provide chat or email support to users around the world. If someone in Tokyo attempts to contact your support team in London via chat, the support team may not be available. However, by using Abstract's Time, Date, and Timezone API, and specifically with /convert_time endpoint, you could tell the user in Tokyo exactly when the support team will be available. There are many powerful use cases for this API, including by combining it with our popular Public Holiday API to understand when public holidays are in a given location. If you have a unique use case for the API that you would like to share with us, just let us know!
Yes, the API includes detailed information on Daylight Savings Time, including whether it applies to a given timezone and whether it applies at given time to the request timezone.
While the API documentation will provide the most up to date list of supported timezones, the list of supported timezones as of June 2020 includes: Australian Central Daylight Saving Time (ACDT), Australian Central Standard Time (ACST), Acre Time (ACT), ASEAN Common Time (ACT), Australian Central Western Standard Time (ACWST), Atlantic Daylight Time (ADT), Australian Eastern Daylight Saving Time (AEDT), Australian Eastern Standard Time (AEST), Australian Eastern Time (AET), Afghanistan Time (AFT), Alaska Daylight Time (AKDT), Alaska Standard Time (AKST), Alma-Ata Time (ALMT), Amazon Summer Time (AMST), Amazon Time (AMT), Armenia Time (AMT), Anadyr Time (ANAT), Aqtobe Time (AQTT), Argentina Time (ART), Arabia Standard Time (AST), Atlantic Standard Time (AST), Australian Western Standard Time (AWST), Azores Summer Time (AZOST), Azores Standard Time (AZOT), Azerbaijan Time (AZT), Brunei Time (BDT), British Indian Ocean Time (BIOT), Baker Island Time (BIT), Bolivia Time (BOT), Brasília Summer Time (BRST), Brasília Time (BRT), Bangladesh Standard Time (BST), Bougainville Standard Time (BST), British Summer Time (BST), Bhutan Time (BTT), Central Africa Time (CAT), Cocos Islands Time (CCT), Central Daylight Time (CDT), Cuba Daylight Time (CDT), Central European Summer Time (CEST), Central European Time (CET), Chatham Daylight Time (CHADT), Chatham Standard Time (CHAST), Choibalsan Standard Time (CHOT), Choibalsan Summer Time (CHOST), Chamorro Standard Time (CHST), Chuuk Time (CHUT), Clipperton Island Standard Time (CIST), Central Indonesia Time (CIT), Cook Island Time (CKT), Chile Summer Time (CLST), Chile Standard Time (CLT), Colombia Summer Time (COST), Colombia Time (COT), Central Standard Time (CST), China Standard Time (CST), Cuba Standard Time (CST), China Time (CT), Cape Verde Time (CVT), Central Western Standard Time (CWST), Christmas Island Time (CXT), Davis Time (DAVT), Dumont d'Urville Time (DDUT), AIX-specific equivalent of Central European Time (DFT), Easter Island Summer Time (EASST), Easter Island Standard Time (EAST), East Africa Time (EAT), Eastern Caribbean Time (ECT), Ecuador Time (ECT), Eastern Daylight Time (EDT), Eastern European Summer Time (EEST), Eastern European Time (EET), Eastern Greenland Summer Time (EGST), Eastern Greenland Time (EGT), Eastern Indonesian Time (EIT), Eastern Standard Time (EST), Further-eastern European Time (FET), Fiji Time (FJT), Falkland Islands Summer Time (FKST), Falkland Islands Time (FKT), Fernando de Noronha Time (FNT), Galápagos Time (GALT), Gambier Islands Time (GAMT), Georgia Standard Time (GET), French Guiana Time (GFT), Gilbert Island Time (GILT), Gambier Island Time (GIT), Greenwich Mean Time (GMT), South Georgia and the South Sandwich Islands Time (GST), Gulf Standard Time (GST), Guyana Time (GYT), Hawaii–Aleutian Daylight Time (HDT), Heure Avancée d'Europe Centrale French-language name for CEST (HAEC), Hawaii–Aleutian Standard Time (HST), Hong Kong Time (HKT), Heard and McDonald Islands Time (HMT), Hovd Summer Time (HOVST), Hovd Time (HOVT), Indochina Time (ICT), International Day Line West time zone (IDLW), Israel Daylight Time (IDT), Indian Ocean Time (IOT), Iran Daylight Time (IRDT), Irkutsk Time (IRKT), Iran Standard Time (IRST), Indian Standard Time (IST), Irish Standard Time (IST), Israel Standard Time (IST), Japan Standard Time (JST), Kaliningrad Time (KALT), Kyrgyzstan Time (KGT), Kosrae Time (KOST), Krasnoyarsk Time (KRAT), Korea Standard Time (KST), Lord Howe Standard Time (LHST), Lord Howe Summer Time (LHST), Line Islands Time (LINT), Magadan Time (MAGT), Marquesas Islands Time (MART), Mawson Station Time (MAWT), Mountain Daylight Time (MDT), Middle European Time Same zone as CET (MET), Middle European Summer Time Same zone as CEST (MEST), Marshall Islands Time (MHT), Macquarie Island Station Time (MIST), Marquesas Islands Time (MIT), Myanmar Standard Time (MMT), Moscow Time (MSK), Malaysia Standard Time (MST), Mountain Standard Time (MST), Mauritius Time (MUT), Maldives Time (MVT), Malaysia Time (MYT), New Caledonia Time (NCT), Newfoundland Daylight Time (NDT), Norfolk Island Time (NFT), Novosibirsk Time (NOVT), Nepal Time (NPT), Newfoundland Standard Time (NST), Newfoundland Time (NT), Niue Time (NUT), New Zealand Daylight Time (NZDT), New Zealand Standard Time (NZST), Omsk Time (OMST), Oral Time (ORAT), Pacific Daylight Time (PDT), Peru Time (PET), Kamchatka Time (PETT), Papua New Guinea Time (PGT), Phoenix Island Time (PHOT), Philippine Time (PHT), Pakistan Standard Time (PKT), Saint Pierre and Miquelon Daylight Time (PMDT), Saint Pierre and Miquelon Standard Time (PMST), Pohnpei Standard Time (PONT), Pacific Standard Time (PST), Philippine Standard Time (PST), Paraguay Summer Time (PYST), Paraguay Time (PYT), Réunion Time (RET), Rothera Research Station Time (ROTT), Sakhalin Island Time (SAKT), Samara Time (SAMT), South African Standard Time (SAST), Solomon Islands Time (SBT), Seychelles Time (SCT), Samoa Daylight Time (SDT), Singapore Time (SGT), Sri Lanka Standard Time (SLST), Srednekolymsk Time (SRET), Suriname Time (SRT), Samoa Standard Time (SST), Singapore Standard Time (SST), Showa Station Time (SYOT), Tahiti Time (TAHT), Thailand Standard Time (THA), French Southern and Antarctic Time (TFT), Tajikistan Time (TJT), Tokelau Time (TKT), Timor Leste Time (TLT), Turkmenistan Time (TMT), Turkey Time (TRT), Tonga Time (TOT), Tuvalu Time (TVT), Ulaanbaatar Summer Time (ULAST), Ulaanbaatar Standard Time (ULAT), Coordinated Universal Time (UTC), Uruguay Summer Time (UYST), Uruguay Standard Time (UYT), Uzbekistan Time (UZT), Venezuelan Standard Time (VET), Vladivostok Time (VLAT), Volgograd Time (VOLT), Vostok Station Time (VOST), Vanuatu Time (VUT), Wake Island Time (WAKT), West Africa Summer Time (WAST), West Africa Time (WAT), Western European Summer Time (WEST), Western European Time (WET), Western Indonesian Time (WIT), West Greenland Summer Time (WGST), West Greenland Time (WGT), Western Standard Time (WST), Yakutsk Time (YAKT), and Yekaterinburg Time (YEKT).
May 29, 2023
-
Added support for Leap Second adjustments to ensure UTC compliance
December 1, 2020
-
Updated data and time zone abbreviations for DST
July 2, 2020
-
Improved and update Daylight Savings Time (DST) handling
June 5, 2020
-
Fixed a bug with conversions from some timezones when time was specified down to the millisecond
Each of our API's has a free plan as well as several paid options, which offer a greater number of requests, a higher level of data quality, and greater speed for higher prices. Please see the page above or sign into your account to view pricing for each API.
Absolutely! We want you to try before you buy. Each of our API's has a free tier with a generous usage allowance for you to try the product out and verify that the speed and data quality work for you.
We use Stripe to accept payment via major debit and credit cards (Visa, Mastercard, American Express). If you cannot use those payment methods, then contact us at team at abstractapi.com to arrange for an alternative payment method.
Yes, you can upgrade or downgrade your subscription at any time by visiting your dashboard. If you upgrade in the middle of a billing cycle, you will be charged a pro-rated amount for your new plan through the end of the billing cycle.
Yes, all of our subscriptions are month to month. You can cancel at any time, and you will not be charged again at the end of your billing cycle.
You can cancel your subscription at any time from your dashboard. Once canceled, your subscription will be active until the end your current billing cycle, and then it will be automatically moved to the free plan.
If your API usage exceeds the monthly limit set by your plan, then you will be charged a fee for each call over your limit. At the end of your billing period, your usage will reset again.
We do offer enterprise plans with custom features and pricing in limited circumstances. If our public pricing plans don't work for you, then contact us (team at abstractapi.com) and we'll work something out.
While we don't normally offer discounts, we do make exceptions for certain types of users and use cases. If you are a student or are engaged in academic work, or are working on a non-profit or open source project, we're happy to offer you discounts for our API's. Just email us at team at abstractapi.com.
All of our plans are currently paid month to month. We will be launching annual plans at a discount soon. If you're interested in an annual plan in the meantime, just contact us and we'll set you up.
We will typically attempt to charge your payment method up to three times after it fails. If we're still unable to collect payment, then your subscription will be automatically canceled and you'll be moved to the free plan.
Yes, a paid tier of our API may be used in conjunction with a commercial project. The free tiers of our API's may not be used in commercial projects.