ipgeolocation's free Timezone API provides time and date related information such as current time, date in various formats, week, month, year, time in unix timestamp, UTC/GMT offset and day light saving time from timezone name, any IPv4 or IPv6 address or geolocation coordinates in REST, JSON and XML format over secure HTTPS connection.
Get Free API Access
{
"geo": {
"ip":
-
"country_code2":
-
"country_code3":
-
"country_name":
-
"state_prov":
-
"district":
-
"city":
-
"zipcode":
-
"latitude":
-
"longitude":
-
},
"timezone":
-
"timezone_offset":
-
"date":
-
"date_time":
-
"date_time_txt":
-
"date_time_wti":
-
"date_time_ymd":
-
"date_time_unix":
-
"time_24":
-
"time_12":
-
"week":
-
"month":
-
"year":
-
"year_abbr":
-
"is_dst":
-
"dst_savings":
-
}
Detailed timezone data consists of current time, date in various date formats, day light saving information and geolocation data(in case of ip to timezone call).
{
"timezone": America/Los_Angeles
"timezone_offset": -8
"date": 2019-05-08
"date_time": 2019-05-08 03:16:34
"date_time_txt": Wednesday, May 08, 2019 03:16:34
"date_time_wti": Wed, 08 May 2019 03:16:34 -0700
"date_time_ymd": 2019-05-08T03:16:34-0700
"date_time_unix": 1557310594.381
"time_24": 03:16:34
"time_12": 03:16:34 AM
"week": 19
"month": 05
"year": 2019
"year_abbr": 19
"is_dst": true
"dst_savings": 1
}
$ curl 'https://api.ipgeolocation.io/timezone?apiKey=API_KEY&tz=America/Los_Angeles'
{
"timezone": America/Los_Angeles
"timezone_offset": -8
"date": 2019-05-08
"date_time": 2019-05-08 03:16:34
"date_time_txt": Wednesday, May 08, 2019 03:16:34
"date_time_wti": Wed, 08 May 2019 03:16:34 -0700
"date_time_ymd": 2019-05-08T03:16:34-0700
"date_time_unix": 1557310594.381
"time_24": 03:16:34
"time_12": 03:16:34 AM
"week": 19
"month": 05
"year": 2019
"year_abbr": 19
"is_dst": true
"dst_savings": 1
}
You can pass a valid time zone name as a query parameter tz to get the time zone information. Here is a curl example:
You can pass the latitude and longitude of a location as query parameters to get the timezone information. Here is a curl example:
$ curl 'https://api.ipgeolocation.io/timezone?apiKey=API_KEY&lat=-27.4748&long=153.017'
{
"timezone": Australia/Brisbane
"timezone_offset": 10
"date": 2019-05-09
"date_time": 2019-05-09 16:19:51
"date_time_txt": Thursday, May 09, 2019 16:19:51
"date_time_wti": Thu, 09 May 2019 16:19:51 +1000
"date_time_ymd": 2019-05-09T16:19:51+1000
"date_time_unix": 1557382791.6194
"time_24": 16:19:51
"time_12": 04:19:51 PM
"week": 19
"month": 05
"year": 2019
"year_abbr": 19
"is_dst": false
"dst_savings": 0
}
$ curl 'https://api.ipgeolocation.io/timezone?apiKey=API_KEY&ip=8.8.8.8'
{
"geo": {
"ip": "8.8.8.8",
"country_code2": "US",
"country_code3": "USA",
"country_name": "United States",
"state_prov": "California",
"district": "Santa Clara County",
"city": "Mountain View",
"zipcode": "94041",
"latitude": "37.42290",
"longitude": "-122.08500",
},
"timezone": America/Los_Angeles
"timezone_offset": -8,
"date": 2019-05-09
"date_time": 2019-05-09 01:05:31
"date_time_txt": Thursday, May 09, 2019 01:05:31
"date_time_wti": Thu, 09 May 2019 01:05:31 -0700
"date_time_ymd": 2019-05-09T01:05:31-0700
"date_time_unix": 1557389131.428,
"time_24": 01:05:31
"time_12": 01:05:31 AM
"week": 19
"month": 05
"year": 2019
"year_abbr": 19
"is_dst": true,
"dst_savings": 1
}
You can pass any IPv4 or IPv6 address as a query parameter to get the regional time zone information. Here is a curl example:
The geolocation information for an IP address from the Timezone API can be retrieve in the following languages:
Build an application for Travellers who move a lot between different timezones! Use the timezone API to keep them up-to-date and up-to-time always, no matter how many time zones they have skip over.
Make sure you know which part of the world your buyers are coming from and show them the right message at the(ir) right time..
For teams that work from all over the globe, make communications a piece of cake using our free time zone API.