> Documentation index: https://developers.google.com/maps/documentation/llms.txt

> [!NOTE]
> **Before you begin:** Before you start using the Time Zone API, you need a project with a billing account and the Time Zone API enabled. We recommend creating multiple Project Owners and Billing Administrators, so that you'll always have someone with these roles available to your team. To learn more, see [Set up in Cloud console](https://developers.google.com/maps/documentation/timezone/cloud-setup).

The Time Zone API provides time offset data for locations on the
surface of the Earth. Request the time zone information for a specific latitude
and longitude pair and date. The API returns the name of that time zone, the
time offset from UTC, and the daylight saving time offset.

## Sample request and response

Access the Time Zone API through an HTTPS interface, with
requests constructed as a URL string, using latitude and longitude coordinates
to specify the `location`, a `timestamp` to specify the date, and your API key.

The following query performs a time zone request for Nevada, USA. The timestamp
is set to March 8, 2012.

### URL

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

### curl

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

You can test this request by entering the URL into your web browser. Be sure to
replace `YOUR_API_KEY` with
[your actual API key](https://developers.google.com/maps/documentation/timezone/get-api-key.md.txt). The response
includes the time zone data for the specified location and date (`timestamp`).

For more information about
[building request URLs and available parameters](https://developers.google.com/maps/documentation/timezone/overview.md.txt#requests)
and
[understanding the response](https://developers.google.com/maps/documentation/timezone/overview.md.txt#TimeZoneResponse),
see the [developer's guide](https://developers.google.com/maps/documentation/timezone/overview.md.txt).

The following sample shows a response in JSON:

### JSON

```json
{
  "dstOffset": 0,
  "rawOffset": -28800,
  "status": "OK",
  "timeZoneId": "America/Los_Angeles",
  "timeZoneName": "Pacific Standard Time",
}
```

### XML

```xml
<TimeZoneResponse>
 <status>OK</status>
 <raw_offset>-28800.0000000</raw_offset>
 <dst_offset>0.0000000</dst_offset>
 <time_zone_id>America/Los_Angeles</time_zone_id>
 <time_zone_name>Pacific Standard Time</time_zone_name>
</TimeZoneResponse>
```

## Start coding with client libraries

Client libraries simplify developing with the Google Maps web service APIs by
providing straightforward, built-in implementations of common tasks such as
authentication, request throttling, and automatic retry. The
Time Zone API is available in the
[Java Client, Python Client, Go Client, and Node.js Client for Google Maps Services](https://developers.google.com/maps/documentation/timezone/client-library.md.txt).

## Authentication, quotas, pricing, and policies

### Authentication

To use the Time Zone API, you must first enable the API and obtain
the proper authentication credentials. For more information, see
[Get started with Google Maps Platform](https://developers.google.com/maps/get-started.md.txt).

### Quotas and pricing

For details on the quotas and pricing set for the Time Zone API,
see [Usage and billing](https://developers.google.com/maps/documentation/timezone/usage-limits).

### Policies

Use of the Time Zone API must comply with the
[API policies](https://developers.google.com/maps/documentation/timezone/policies.md.txt).

## Learn more

In the Time Zone API, you can also set a language parameter to return
results in languages other than the default of English. See the
[Time Zone API Developer Guide](https://developers.google.com/maps/documentation/timezone/overview.md.txt)
for more examples and other details.

The
[Time Zone API Developer Guide](https://developers.google.com/maps/documentation/timezone/overview.md.txt)
helps website and mobile developers include time data on maps provided by one of
the Google Maps Platform APIs. It provides an introduction to using the API and
reference material on the available parameters.