Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>We encountered same issue and, alongside the great suggestions above, Google appears to have two complementary APIs, one for Time Zone from geocode (latitude/longitude) data and the geocode API.</p> <p>For example, to get the time zone and offset for San Francisco:</p> <h3>1) Convert the city to a geocoded location:</h3> <p><a href="http://maps.googleapis.com/maps/api/geocode/json?address=San%20Francisco,%20CA&amp;sensor=false">http://maps.googleapis.com/maps/api/geocode/json?address=San%20Francisco,+CA&amp;sensor=false</a></p> <p>The geocoded location is in the JSON return data:</p> <pre><code>"location": { "lat": 37.77492950, "lng": -122.41941550 } </code></pre> <h3>2) Convert the geocoded location to a local timezone and offset, if any:</h3> <p><a href="https://maps.googleapis.com/maps/api/timezone/json?location=37.77492950,-122.41941550&amp;timestamp=1331161200&amp;sensor=false">https://maps.googleapis.com/maps/api/timezone/json?location=37.77492950,-122.41941550&amp;timestamp=1331161200&amp;sensor=false</a></p> <p>Which returns the current time zone information:</p> <pre><code>{ "status": "OK", "dstOffset": 0.0, "rawOffset": -28800.0, "timeZoneId": "America/Los_Angeles", "timeZoneName": "Pacific Standard Time" } </code></pre> <p>Time zones for a region can change for a variety of reasons. So it is a good idea to find an authoritative server-based solution and not cache. For more information see <a href="http://en.wikipedia.org/wiki/Time_zone#Programming_languages">Wikipedia's Time Zone article</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload