PHPackages                             imelgrat/google-time-zone - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. imelgrat/google-time-zone

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

imelgrat/google-time-zone
=========================

A PHP wrapper for the Google Maps TimeZone API.

1.5.1(7y ago)8889.3k↑11.4%4MITPHPPHP &gt;=5.3.0

Since Sep 13Pushed 7y ago3 watchersCompare

[ Source](https://github.com/imelgrat/google-time-zone)[ Packagist](https://packagist.org/packages/imelgrat/google-time-zone)[ Docs](https://github.com/imelgrat/google-time-zone)[ RSS](/packages/imelgrat-google-time-zone/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

google-time-zone
================

[](#google-time-zone)

[![GitHub license](https://camo.githubusercontent.com/c74b1f21d6ded7d1868aa4f81d1c8d60e7f2c7d78120c0a0386b883c1536040d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f696d656c677261742f676f6f676c652d74696d652d7a6f6e652e7376673f7374796c653d666c61742d737175617265)](https://github.com/imelgrat/google-time-zone/blob/master/LICENSE)[![GitHub release](https://camo.githubusercontent.com/b9f3aeb30ce37e0679d38e353fd7d96c2904d01d66e50237f30403d509e47cf0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f696d656c677261742f676f6f676c652d74696d652d7a6f6e652e7376673f7374796c653d666c61742d737175617265)](https://github.com/imelgrat/google-time-zone/releases)[![Total Downloads](https://camo.githubusercontent.com/ede32f9caee0634423037c8f88d66e33b320f3734cc54f300132a6c3dcac189b/68747470733a2f2f706f7365722e707567782e6f72672f696d656c677261742f676f6f676c652d74696d652d7a6f6e652f646f776e6c6f616473)](https://packagist.org/packages/imelgrat/google-time-zone)[![GitHub issues](https://camo.githubusercontent.com/4196081ddcdc4445beaf4b9e6d8991e178529134a3eb6abbf42ca7291a966a83/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f696d656c677261742f676f6f676c652d74696d652d7a6f6e652e7376673f7374796c653d666c61742d737175617265)](https://github.com/imelgrat/google-time-zone/issues)[![GitHub stars](https://camo.githubusercontent.com/94293e1e1d46a0a6c4e5024f4732ee1273cbd6c25c3893c5f5bb0ace20dba34f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f696d656c677261742f676f6f676c652d74696d652d7a6f6e652e7376673f7374796c653d666c61742d737175617265)](https://github.com/imelgrat/google-time-zone/stargazers)

A PHP wrapper for the Google Maps TimeZone API.

The Google Maps Time Zone API provides a simple interface to request the time zone for a location on the earth, as well as that location's time offset from UTC.

The API provides time offset data for any locations on Earch. Requests for the time zone information are made for a specific latitude/longitude pair and timestamp.

The class automates the query process and returns the name of that time zone (in different languages), the time offset from UTC, and the daylight savings offset in a user-selectable format (XML or JSON).

Developed by [Ivan Melgrati](https://imelgrat.me)

======= A PHP wrapper for the Google Maps Time Zone API.

Developed by [Ivan Melgrati](https://imelgrat.me) [![Twitter](https://camo.githubusercontent.com/1476af6a00bb9d30a5d7d79ac278ac5fd7b5544c8f6b71a39ae67cdd269b09f2/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f75726c2f68747470732f6769746875622e636f6d2f696d656c677261742f7461622d636f6c6c617073652e7376673f7374796c653d736f6369616c)](https://twitter.com/imelgrat)

Requirements
------------

[](#requirements)

- PHP &gt;= 5.3.0
- In order to be able to use this class, it's necessary to provide an API key or, for business clients, Client ID and signing key.

Installation
------------

[](#installation)

### Composer

[](#composer)

The recommended installation method is through [Composer](http://getcomposer.org/), a dependency manager for PHP. Just add `imelgrat/google-time-zone` to your project's `composer.json` file:

```
{
    "require": {
        "imelgrat/google-time-zone": "*"
    }
}
```

[More details](http://packagist.org/packages/imelgrat/google-time-zone) can be found over at [Packagist](http://packagist.org).

### Manually

[](#manually)

1. Copy `src/GoogleMapsTimeZone.php` to your codebase, perhaps to the `vendor`directory.
2. Add the `GoogleMapsTimeZone` class to your autoloader or `require` the file directly.

Then, in order to use the GoogleMapsTimeZone class, you need to invoke the "use" operator to bring the class into skope.

```
