Time Zone API overview

  • The Time Zone API provides time zone data, including UTC and daylight savings offsets, for specific locations based on latitude/longitude and timestamp.

  • You can use the API to display localized time zone names, offsets, and enhance time-based data in your applications.

  • The API accepts HTTPS requests with location and timestamp parameters and returns data in JSON or XML format.

  • Client libraries are available in Java, Python, Go, and Node.js for easy integration into your projects.

The Time Zone API is a service that accepts an HTTP request oflatitude/longitude coordinates and a chosen date and time. It returns the timezone data for the location, including offsets for UTC and daylight savingstime.

Why use the Time Zone API

With the Time Zone API, you can develop applications that provide the time zone ID and name for dates and times at specific locations on a map. For example, you can show the following time zone data:

  • Localized time zone names for map locations from the Google Maps Platform.
  • Time zone offsets from UTC and for daylight savings.

Time zone data can be particularly useful when you want to have your website or app display time-based data relevant to your users.

What you can do with the Time Zone API

With the Time Zone API, you can request the time zone for locations on the surface of the earth, with the time offset from UTC and for daylight savings time for each of those locations.

How the Time Zone API works

The Time Zone API accepts an HTTPS request of latitude/longitude coordinates, the desired date and time as a timestamp, and optionally, a language code. It returns data in the format specified by the request. The following example shows a request for Nevada, USA, with a requested output in JSON.

 https://maps.googleapis.com/maps/api/timezone/json    ?location=39.6034810%2C-119.6822510    &timestamp=1733428634    &key=YOUR_API_KEY

Resources

The following table summarizes the resources available through the Time Zone API along with the data it returns.

Data resourcesData returnedReturn format
Timezone

You provide your request along with location and timestamp. Seerequired parameters.

  • Time zone ID.
  • Time zone name, optionally localized
  • Offset from UTC, in seconds
  • Offset for DST, in seconds
  • See Time Zone for specific response examples.
  • JSON
  • XML

How to use the Time Zone API

1Get set upStart withSet up your Google Cloud project and complete the setup instructions that follow.
2Try a timezone requestOnce you have an API key, you can start testing out the Time Zone API directly from your browser. SeeTime Zone examples in theTimezone requests and responses guide for details.
3Understand response basicsExplore how to use timezone data in your app or website. SeeTime Zone responses for details.
5Incorporate timezone data into your own app!You can use timezone data to enhance apps and websites for users across different time-based locales.

Available client libraries

Call this API in the language ofyour choice through one of the following client libraries:

The Java Client, Python Client, Go Client and Node.js Client for Google MapsServices are community-supported client libraries, open sourced under theApache 2.0 License.Download them from GitHub, where you can also find installation instructions and sample code.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-11 UTC.