|Last Updated|| ||Ratings|| ||Unique User Downloads|| ||Download Rankings|
|2018-02-26 (3 months ago) ||Not enough user ratings||Total: 187 ||All time: 8,214 This week: 497|
This class can get a location time zone using Google Maps API.
It takes the geographic coordinates of a given location and sends requests to the Google Maps API to determine the time zone of a given location.
The class returns time zone for the given location, as well as that location's time offset from UTC.
Prize: One ebook of choice by Packt
|Some applications need to be able to show the time for a certain event in the current user time zone. The time zone depends on the geographic location of the user.
The location of the user may be determined from the user IP address by using a geo IP database or Web service.
So, if you have the user location coordinates, you can use the Google Maps API to determine what is the user time zone.
This package can call determine the time zone of a location precisely calling the Google maps API.
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).
A PHP wrapper for the Google Maps Time Zone API.
Developed by Ivan Melgrati
- PHP >= 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.
The recommended installation method is through
Composer, a dependency manager for PHP. Just add
imelgrat/google-time-zone to your project's
More details can be found over at Packagist.
src/GoogleMapsTimeZone.php to your codebase, perhaps to the
- Add the
GoogleMapsTimeZone class to your autoloader or
require the file
Please open an issue to request a feature or submit a bug report. Or even if
you just want to provide some feedback, I'd love to hear. I'm also available on
Twitter as @imelgrat.
- Fork it.
- Create your feature branch (
git checkout -b my-new-feature).
- Commit your changes (
git commit -am 'Added some feature').
- Push to the branch (
git push origin my-new-feature).
- Create a new Pull Request.
||Applications that use this package
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.