Reference: Convert Time Zone

http://api.timezonedb.com/v2/convert-time-zone

Convert timestamp between two different time zone.

Other End Points

Parameters

Parameter Description
key
REQUIRED
Your unique API key you get after register your account.
format
OPTIONAL
The response format from API. It can be either xml or json.

DEFAULT: xml
callback
OPTIONAL
Use for JavaScript JSON callback.
fields
OPTIONAL
Customize the field to display in response. Use commas ("," without spaces) to separate the field names.

FIELDS: fromZoneName, fromAbbreviation, fromTimestamp, toZoneName, toAbbreviation, toTimestamp, offset
DEFAULT: all
from
REQUIRED
A valid abbreviation or name of time zone to convert from.
to
REQUIRED
A valid abbreviation or name of time zone to convert to.
time
OPTIONAL
Local Unix time of the from time zone.

DEFAULT: Current UTC time.

Responses

Field Description
status Status of the API query. Either OK or FAILED.
message Error message. Empty if no error.
fromZoneName The time zone name of the origin city.
fromfromAbbreviation Time zone abbreviation of the origin city.
fromTimestamp Time of the origin city in Unix time.
toZoneName The time zone name of the destination city.
totoAbbreviation Time zone abbreviation of the destination city.
toTimestamp Time of the destination city in Unix time.
offset Different in minute between origin time zone and destination time zone.

Usage Examples

What is the time in Sydney, Australia when 01 June, 2016 03:00PM in Los Angeles, USA?

Query
http://api.timezonedb.com/v2/convert-time-zone?key=YOUR_API_KEY&format=xml&from=America/Los_Angeles&to=Australia/Sydney&time=1464793200
Response
<?xml version="1.0" encoding="UTF-8"?>
<result>
	<status>OK</status>
	<message/>
	<fromZoneName>America/Los_Angeles</fromZoneName>
	<fromAbbreviation>PDT</fromAbbreviation>
	<fromTimestamp>1464793200</fromTimestamp>
	<toZoneName>Australia/Sydney</toZoneName>
	<toAbbreviation>AEST</toAbbreviation>
	<toTimestamp>1464854400</toTimestamp>
	<offset>61200</offset>
</result>
Query
http://api.timezonedb.com/v2/convert-time-zone?key=YOUR_API_KEY&format=json&from=America/Los_Angeles&to=Australia/Sydney&time=1464793200
Response
{
	"status":"OK",
	"message":"",
	"fromZoneName":"America\/Los_Angeles",
	"fromAbbreviation":"PDT",
	"fromTimestamp":1464793200,
	"toZoneName":"Australia\/Sydney",
	"toAbbreviation":"AEST",
	"toTimestamp":1464854400,
	"offset":61200
}