Free Time Zone API

Time Zone API

You can easily integrate local time into your personal and commercial website and application by using our free time zone API.

Our time zone API provides you with the local time, UTC offset, daylight savings and time zone details. It is available in JSON format and easily accessible through a simple API request over a secure HTTPS connection.

Free Sign up!

Time Zone API Request

The base URL for our time zone API is

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

Request Parameters

All the API request parameters are required.

ParameterDescription
api_keyYour assigned API key.
locLocation for which you would like to retrieve the time zone details.

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 retrieve the time zone for New York:

https://www.amdoren.com/api/timezone.php?api_key=IBZzdLmM2yCYaXjgTZ6x&loc=New+York

Get your FREE time zone API key now!

Sample PHP snippet on how to use our time zone API

Time Zone API Response

ElementDescription
errorError code. Value greater than zero indicates an error. See list below.
error_messageShort decription of the error. See list below.
timeLocal date & time in the format YYYY-MM-DD hh:mm:ss.
timezoneName of time zone.
offsetUTC offset in minutes.
daylight_savings"In daylight savings" or "No daylight savings".

Example:
JSON data returned from our time zone API request:

{ "error" : 0, "error_message" : "-", "time" : "2016-11-04 23:18:46", "timezone" : "Eastern Standard Time", "offset" : -240, "daylight_savings" : "In daylight savings" }

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.
200Location not provided.
400API limit reached for the month.
500Location not found.

Get our free time zone API for your website and application!

Our free time zone 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 AVG Threat Labs

Go to top of page