Time Zone Info API

Introduction

 

Our Time Zone Info API is a potent yet straightforward tool that provides in-depth active IANA time zone information, including daylight saving time adjustments if relevant. Additionally, it returns the current local time by default, and if given a UTC reference time, it automatically performs time zone conversion for you.

Get Started

This API is part of the IP Geolocation API Package and is available in free and paid plans. Please visit the IP Geolocation API Package package page for limits and pricing information.

Endpoint

GET
https://api-bdc.net/data/timezone-info

Request

Parameter
timeZoneId
Type
string
Required
Yes
Description
Time Zone name in IANA format, for example 'Australia/Sydney'
Parameter
utcReference
Type
integer (int64)
Required
Optional, default value: 0
Description
UTC reference in Unix Time Seconds format. When omitted or invalid, the current time is assumed
Parameter
key
Type
string
Required
Yes
Description
Your API key

Responses

200
OK

Sample Query

GET
https://api-bdc.net/data/timezone-info?timeZoneId=Australia/Sydney&key=[YOUR API KEY]

Schema

application/json
ianaTimeIdstring
The unique identifier of the time zone from the IANA Time Zone Database (e.g., "America/New_York").
displayNamestring
displayName object
effectiveTimeZoneFullstring
The full name of the effective time zone, adjusted for daylight saving (e.g., "Eastern Daylight Time").
effectiveTimeZoneShortstring
The abbreviated name of the effective time zone, adjusted for daylight saving (e.g., "EDT").
utcOffsetSecondsinteger
The effective offset from UTC in seconds, adjusted for daylight saving time.
utcOffsetstring
The effective offset from UTC, formatted as a string and adjusted for daylight saving time.
isDaylightSavingTimeboolean
A boolean value indicating whether daylight saving time is currently in effect.
localTimestring
The current local time in the specified time zone, formatted in ISO 8601 "O" format.
utcTimestring
The corresponding UTC time, formatted in ISO 8601 "O" format. This value is omitted if the 'utcReference' parameter was not supplied or was invalid.

Sample Response

JSON View
400
Bad request

Sample Response

JSON View
403
Access denied, or your quota limit has exceeded

Sample Response

JSON View
404
Found no valid entry for the request

Sample Response

JSON View
500
An error has occurred and did not complete your request. Please try again

Sample Response

JSON View
Was this page helpful?