Get started

Time, Date, & Timezone API

Quickly and easily get the time and date of a location or IP address, or convert the time and date of one timezone into another
Get your free API key
Test it out
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Request

GET https://time.abstractapi.com
?vat=Paris&api_key=KndsqhGSD6672dhGS6

Serving billions of calls to 1,000,000+ developers and end users worldwide

Why 10,000+ developers love Abstract's APIs

Easy to implement and maintain

We built Abstract because most of the API's we've used aren't great for developers. That's why Abstract has excellent documentation, multiple easy to use libraries, and tutorials to get you started.

Speed and scale built into everything we do

Our APIs are built to power critical business processes and flows, so all our APIs are built for use at scale and at blazing speeds. These aren't just marketing phrases for, but fundamental features of our APIs.

Reliable uptime and great support

Developers trust Abstract because of our reliable uptime and excellent technical support that will help get you live quickly, keep you running smoothly, and resolve any issues you have fast.

The Time, Date, and Timezone API makes it easy to find, convert, and manage timezones around the world

Get up to the milisecond time data

It's critical to have the latest and most accurate VAT data, so Abstract works directly with multiple sources, including the EU Commission itself, to provide you trustworthy data.

Convert time from one location to another

You're required to ensure the VAT numbers that you have or that users submit to you are valid, and Abstract makes it easy to validate VAT numbers with a single, simple API call.

Robust global data set of timezones

Abstract's VAT API can calculate the VAT owed on a specific purchase, taking into account the country of purchase as well as other purchase-specific details.

Daylight savings and GMT offset data

Get VAT rates from individual countries, from across the European Union, and from other countries beyond the EU that use VAT. Abstract is the hub for all your VAT data needs.

Simple, transparent, and cost-effective pricing

FREE

$0

no card
required!

  • 5,000 requests / month
  • 1 request / second

PROFESSIONAL

$9

per
month

  • 50,000 requests / month
  • $0.00018 / extra request
  • 50 requests / second
  • Commercial use allowed
  • Email support

ENTERPRISE

Get in touch!

  • >500,000 requests / month
  • 500 requests / second
  • Commercial use allowed
  • Premium enriched data
  • Chat support

Time, Date, and Timezone API Documentation

Overview

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.

REST

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.

HTTPS

The Time, Date, and Timezone API requires all communications to be secured TLS 1.2 or greater.

API Versions

All of Abstract's API are versioned. The Time, Date, and Timezone API is currently on Version 1.

Your API Key

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 APIs, for example. To authenticate your requests, you will need to append your API key to the base URL.

Base URL

https://time.abstractapi.com/v1/

Overview of Endpoints for the Time, Date, and Timezone API

Abstract's Time, Date, and Timezone API contains two main endpoints for accessing and manipulating timezone data:

  • /current_time/ accepts a location (in text or latitude / longitude format) or an IP address, and returns that location's current time, date, and timezone
  • /convert_time/ converts the time and date in a given timezone to that of another timezone, either at the current moment or at some point in the future

Getting a Location's Current Time and Timezone with the /current_time Endpoint

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
}

/current_time/ Endpoint - API Request Parameters

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.

/current_time/ API Response Parameters

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).

Converting time and timezone from one location to another with the /convert_time/ endpoint

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
    }
}

/convert_time/ Endpoint - API Request Parameters

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`

/convert_time/ API Response Parameters

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).

Response and Error Codes

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.

Frequently Asked Questions
about Abstract's Time, Date, and Timezone API

What is the Time, Date, and Timezone API?

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.

What are the common use cases of the Time, Date, and Timezone API?

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!

Is Daylight Savings Time (DST) taken into account with this API?

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.

What timezones does the API support?

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).

Developers love Abstract's Time, Date, and Timezone API

Abstract's Timezone API has been a huge time saver (hah!) for us for the last couple of months. We're now able to display date and time data to our users and actually have a high degree of confidence in it.

Michael F.

Great customer support, great data coverage, reasonable prices, and great documentation. What else could you want from an API? That's why we ended up using multiple APIs from Abstract.

Kelly D.

What a time saver for us. No more juggling outdated datasets on timezones and dealing with weird region specific issues. It's great having a single source of truth for time and data data.

Patrick B.

Time, Date, and Timezone API Changelog

Last Updated on 

July 2, 2020

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

GET STARTED

Get  FREE credits to start today.

Get thousands of API calls for free across all Abstract APIs.
GET YOUR FREE API KEY

Frequently Asked Questions
About Subscription & Pricing

What does the API cost?

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.

Do you have a free trial or free options for your API's?

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.

What payment options do you offer?

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.

Can I upgrade or downgrade my subscription?

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.

Can I cancel at any time?

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.

How can I cancel my subscription?

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.

What happens if I go over my monthly quota for requests?

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.

What if I need more requests or something else that's not offered in your plans?

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.

Do you offer any discounts?

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.

Do you offer discounts for annual or quarterly payments?

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.

What happens if my payment method expires?

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.

Can I use the API's for a commercial project?

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.

Simple, transparent, and cost-effective pricing

FREE

$0

no card
required!

  • 100 requests
  • 1 request / second

PROFESSIONAL

$9

per
month

  • 1,000 requests / month
  • $0.009 / extra request
  • 50 requests / second
  • Email support

ENTERPRISE

Get in touch!

  • >500,000 requests / month
  • 500 requests / second
  • Commercial use allowed
  • Premium enriched data
  • Chat support