Free Time API

Time API

You can easily convert the time in one location and time zone to the time in another location and time zone by using our free time API.

Our time API is available in JSON format and easily accessible through a simple API request over a secure HTTPS connection.

Free Sign up!

Time API Request

The base URL for our time API is

https://www.amdoren.com/api/time.php

Request Parameters

All the API request parameters are required.

ParameterDescription
api_keyYour assigned API key.
fromLocation and time zone in which you would like to convert the time from.
timeLocal time to convert from.
toLocation and time zone in which you would like to convert the time to.

Check available locations:

You can also retrieve all the available locations using the get locations API.

Location can be specified as:
- City eg "New York"
- Country, City eg "USA, New York"
- Country, State, City eg "USA, New York, Bronx"

Example:
To convert the time in New York to the time in London:

https://www.amdoren.com/api/time.php?api_key=IBZzdLmM2yCYaXjgTZ6x&from=New+York&time=2016-12-25+21%3A30&to=London

Get your FREE time API key now!

Sample PHP snippet on how to use our time API

Time API Response

ElementDescription
errorError code. Value greater than zero indicates an error. See list below.
error_messageShort decription of the error. See list below.
timeConverted date & time in the to location in the format YYYY-MM-DD hh:mm.
diffTime difference in minutes.
diff_hrTime difference in hours.

Example:
JSON data returned from our time API request:

{ "error" : 0, "error_message" : "-", "time" : "2016-12-26 02:30", "diff" : "300", "diff_hr" : "5.0" }

Sign up for your free developer account!

Get Locations API Request

The base URL to retrieve all the available locations is

https://www.amdoren.com/api/locations.php

Request Parameters

All the API request parameters are required.

ParameterDescription
api_keyYour assigned API key.

Get Locations API Response

ElementDescription
errorError code. Value greater than zero indicates an error. See list below.
error_messageShort decription of the error. See list below.
locationsArray of location data.
- countryCountry.
- stateState.
- cityCity.

List of Error Codes & Error Messages

Error CodeDescription
0No error.
100API key not provided.
110Invalid API key.
200From location not provided.
250To location not provided.
300Time not provided.
310Invalid time.
400API limit reached for the month.
500From location not found.
600To location not found.

Get our free time API for your website and application!

Our free time API is highly stable & reliable. See our uptime

amdoren.com is verified safe by Google Safe Browsing

amdoren.com is verified safe by McAfee SiteAdvisor

amdoren.com is verified safe by Norton Safe Web

Go to top of page