Loading
Loading
Convert a timestamp from one timezone to another using any supported location identifier - timezone names, GPS coordinates, city or address strings, IATA airport codes, ICAO codes, or UN/LOCODEs.
The Timezone Converter API takes a source timezone, a destination timezone, and an optional timestamp, then returns the converted time along with the hour and minute difference between the two zones. Omit the time parameter to convert the current time. The same 6 input methods available in the Timezone Lookup API are supported for both source and destination - pass matching _from and _to parameter pairs.
Authorize every request with your API key, passed either as a header or as a query parameter:
X-apiKeyapiKeyThis is version v1.0 of the API.
All parameters are optional query string parameters. You must provide a matching _from/_to pair from one of the supported input methods: timezone names (tz_from/tz_to), coordinates (lat_from/long_from and lat_to/long_to), location addresses (location_from/location_to), IATA codes (iata_from/iata_to), ICAO codes (icao_from/icao_to), or UN/LOCODEs (locode_from/locode_to).
formatoptionalStringdefault: jsonResponse format: 'json' (default) or 'xml'.
timeoptionalStringTime value for conversion. Two formats supported:
tz_fromoptionalStringFrom timezone name (IANA format) for conversion using timezone name
tz_tooptionalStringTo timezone name (IANA format) for conversion using timezone name
lat_fromoptionalIntegerFrom latitude coordinate for conversion using location coordinates
long_fromoptionalIntegerFrom longitude coordinate for conversion using location coordinates
lat_tooptionalIntegerTo latitude coordinate for conversion using location coordinates
long_tooptionalIntegerTo longitude coordinate for conversion using location coordinates
location_fromoptionalStringFrom location address for conversion using location address
location_tooptionalStringTo location address for conversion using location address
iata_fromoptionalStringFrom IATA airport code (3-letter) for conversion using airport code
iata_tooptionalStringTo IATA airport code (3-letter) for conversion using airport code
icao_fromoptionalStringFrom ICAO airport code (4-letter) for conversion using airport code
icao_tooptionalStringTo ICAO airport code (4-letter) for conversion using airport code
locode_fromoptionalStringFrom UN/LO CODE (5-letter) for conversion using location code
locode_tooptionalStringTo UN/LO CODE (5-letter) for conversion using location code
A successful request returns a 200 OK response with a JSON object containing four fields. See the response preview on the right for the full JSON structure.
original_timeThe original input time before conversion
converted_timeThe resulting time after conversion to the target timezone
diff_hourThe time difference between the two timezones in hours
diff_minThe time difference between the two timezones in minutes
Besides the response body, every response carries custom headers you can use to track credit usage, and concurrency usage on endpoints that enforce a concurrency limit. See the Custom Response Headers documentation and the endpoints with concurrency limits for more details.
X-Concurrent-Threadsheaderconcurrency-limited endpointsSpecifies the maximum number of concurrent requests allowed.
X-Concurrent-Threads-Activeheaderconcurrency-limited endpointsIndicates the number of active concurrent requests being processed.
X-AF-Credits-Costheaderall responsesSpecifies the number of credits consumed by the current request.
See the HTTP Status Codes documentation for a complete reference of common API errors and HTTP status codes.
Parameters' combination is not complete. 'tz_from' and 'tz_to' or 'location_from' and 'location_to' or 'lat_from' and 'long_from' and 'lat_to' and 'long_to' or 'locode_from' and 'locode_to' or 'iata_from' and 'iata_to' or 'icao_from' and 'icao_to' combinations must be provided.
Check whether your input values are correct; source_time_zone = Invalid/TZ, destined_time_zone = Asia/Karachi, date_time = null
Provided lat_from (999) or long_from (0) is not valid. Latitude must be between -90.0 and +90.0 and longitude must be between -180.0 and +180.0.
We couldn't find the (from) location (ZZZNOTEXIST). Try a city or state level address only.
'Data not found for the provided airport code: XXX Please contact at support@apifreaks.com if provided airport code exists.'