Recommend this page to a friend! |
Download |
Info | Example | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not enough user ratings | Total: 223 | All time: 8,240 This week: 37 |
Version | License | PHP version | Categories | |||
google-maps-timezone 1.2.8 | MIT/X Consortium ... | 5.3 | Localization, PHP 5, Time and Date, W..., G... |
Description | Author | |||
This class can get a location time zone using Google Maps API. Innovation Award
|
<?php |
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
A PHP wrapper for the Google Maps Time Zone API.
Developed by Ivan Melgrati
The recommended installation method is through
Composer, 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 can be found over at Packagist.
Then, in order to use the GoogleMapsTimeZone class, you need to invoke the "use" operator to bring the class into skope.
<?php
use imelgrat\GoogleMapsTimeZone\GoogleMapsTimeZone;
require_once ('../src/GoogleMapsTimeZone.php');
/
* All queries require an API key from Google
* @link https://developers.google.com/maps/documentation/timezone/get-api-key
/
define('API_KEY', 'YOUR API KEY HERE');
// Initialize GoogleMapsTimeZone object (New York City coordinates)
$timezone_object = new GoogleMapsTimeZone(40.730610, -73.935242, 0, GoogleMapsTimeZone::FORMAT_JSON);
// Set Google API key
$timezone_object->setApiKey(API_KEY);
// Perform query
$timezone_data = $timezone_object->queryTimeZone();
echo '<pre>';
print_r($timezone_data);
echo '</pre>';
?>
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.
Files (69) |
File | Role | Description | ||
---|---|---|---|---|
docs (2 files, 9 directories) | ||||
examples (2 files) | ||||
src (1 file) | ||||
composer.json | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
phpdoc.dist.xml | Data | Auxiliary data | ||
README.md | Doc. | Documentation | ||
VERSION | Data | Auxiliary data |
Files (69) | / | docs |
Files (69) | / | docs | / | classes |
File | Role | Description |
---|---|---|
GoogleMapsTimeZone.html | Doc. | Documentation |
imelgrat.GoogleMap...leMapsTimeZone.html | Doc. | Documentation |
Files (69) | / | docs | / | css |
File | Role | Description | ||
---|---|---|---|---|
phpdocumentor-clean-icons (2 files, 1 directory) | ||||
bootstrap-combined.no-icons.min.css | Data | Auxiliary data | ||
font-awesome.min.css | Data | Auxiliary data | ||
jquery.iviewer.css | Data | Auxiliary data | ||
prism.css | Data | Auxiliary data | ||
template.css | Data | Auxiliary data |
Files (69) | / | docs | / | css | / | phpdocumentor-clean-icons |
File | Role | Description | ||
---|---|---|---|---|
fonts (2 files) | ||||
lte-ie7.js | Data | Auxiliary data | ||
style.css | Data | Auxiliary data |
Files (69) | / | docs | / | css | / | phpdocumentor-clean-icons | / | fonts |
File | Role | Description |
---|---|---|
phpdocumentor-clean-icons.dev.svg | Data | Auxiliary data |
phpdocumentor-clean-icons.svg | Data | Auxiliary data |
Files (69) | / | docs | / | files |
File | Role | Description |
---|---|---|
GoogleMapsTimeZone.html | Doc. | Documentation |
GoogleMapsTimeZone.php.txt | Doc. | Documentation |
Files (69) | / | docs | / | graphs |
File | Role | Description |
---|---|---|
class.html | Doc. | Documentation |
classes.svg | Data | Auxiliary data |
Files (69) | / | docs | / | images |
File | Role | Description | ||
---|---|---|---|---|
iviewer (8 files) | ||||
android-chrome-192x192.png | Icon | Icon image | ||
android-chrome-512x512.png | Data | Auxiliary data | ||
apple-touch-icon-114x114.png | Icon | Icon image | ||
apple-touch-icon-72x72.png | Icon | Icon image | ||
apple-touch-icon.png | Icon | Icon image | ||
custom-icons.svg | Data | Auxiliary data | ||
favicon-16x16.png | Icon | Icon image | ||
favicon-32x32.png | Icon | Icon image | ||
favicon.ico | Data | Auxiliary data | ||
hierarchy-item.png | Icon | Icon image | ||
icon-class-13x13.png | Icon | Icon image | ||
icon-class.svg | Data | Auxiliary data | ||
icon-interface-13x13.png | Icon | Icon image | ||
icon-interface.svg | Data | Auxiliary data | ||
icon-trait-13x13.png | Icon | Icon image | ||
icon-trait.svg | Data | Auxiliary data | ||
mstile-150x150.png | Icon | Icon image | ||
safari-pinned-tab.svg | Data | Auxiliary data |
Files (69) | / | docs | / | images | / | iviewer |
File | Role | Description |
---|---|---|
grab.cur | Data | Auxiliary data |
hand.cur | Data | Auxiliary data |
iviewer.rotate_left.png | Icon | Icon image |
iviewer.rotate_right.png | Icon | Icon image |
iviewer.zoom_fit.png | Icon | Icon image |
iviewer.zoom_in.png | Icon | Icon image |
iviewer.zoom_out.png | Icon | Icon image |
iviewer.zoom_zero.png | Icon | Icon image |
Files (69) | / | docs | / | js |
File | Role | Description | ||
---|---|---|---|---|
ui (1 directory) | ||||
bootstrap.min.js | Data | Auxiliary data | ||
html5.js | Data | Auxiliary data | ||
jquery-1.11.0.min.js | Data | Auxiliary data | ||
jquery.dotdotdot-1.5.9.js | Data | Auxiliary data | ||
jquery.dotdotdot-1.5.9.min.js | Data | Auxiliary data | ||
jquery.iviewer.js | Data | Auxiliary data | ||
jquery.iviewer.min.js | Data | Auxiliary data | ||
jquery.mousewheel.js | Data | Auxiliary data | ||
jquery.smooth-scroll.js | Data | Auxiliary data | ||
prism.min.js | Data | Auxiliary data |
Files (69) | / | docs | / | namespaces |
File | Role | Description |
---|---|---|
default.html | Doc. | Documentation |
imelgrat.GoogleMapsTimeZone.html | Doc. | Documentation |
imelgrat.html | Doc. | Documentation |
Files (69) | / | docs | / | reports |
File | Role | Description |
---|---|---|
deprecated.html | Doc. | Documentation |
errors.html | Doc. | Documentation |
markers.html | Doc. | Documentation |
Files (69) | / | examples |
File | Role | Description |
---|---|---|
example-all-parameters.php | Example | Example script |
example-basic.php | Example | Example script |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
google-maps-timezone-2022-10-21.zip 398KB | |
google-maps-timezone-2022-10-21.tar.gz 373KB | |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.