Home » Google, PHP10 October 2017

PHP: Get Timezone & Time Difference from Latitude & Longitude using Google Maps Time Zone API

This article shows how you can get TimeZone name and id in PHP from latitude and longitude value by using Google Maps Time Zone API.

Note that: You need to put your API Key in the maps api url like this:
https://maps.googleapis.com/maps/api/timezone/json?location=$latitude,$longitude&timestamp=$time&key=xxxxxxxxxxxxxxxxxxxxx

You can get the API key from here: Get API Key

Here is the source code:

Get time from timezone in PHP

Get time difference between the timezone time and GMT time

Another way to get time difference between two timezones

Hope this helps. Thanks.

PHP

Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed