Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Time Zone API #33

wants to merge 5 commits into


None yet
3 participants

Added the time zone api documented here: https://developers.google.com/maps/documentation/timezone/

SocalNick added some commits Nov 5, 2013

Support regular object with lat and lng
Google Geocode returns an object in the geometry section like:

"location" : {
  "lat" : 37.42291810,
  "lng" : -122.08542120

moshen commented Nov 6, 2013

Please include a test. Thanks for the contribution. 👍

@moshen there's a specific test that says it shouldn't support a regular object for lat / lng - is that desired? It seemed to me that supporting a regular object would be desired as that is how it is returned from Google Geocode.

SocalNick added some commits Nov 19, 2013

Timezone Tests
Using nock so the tests don't make actual HTTP calls.
Support regular object for location
Google Geocode returns an object with lat and lng properties. Nice to be able to use this when chaining geocode and a timezone call.

@fabriziomoscon fabriziomoscon commented on the diff Sep 23, 2014

@@ -341,6 +341,23 @@ exports.streetView = function(size, location, callback, sensor,
return makeRequest(path, args, false, callback, 'binary');
+// https://developers.google.com/maps/documentation/timezone
+exports.timezone = function(location, timestamp, callback, sensor, language) {
+ if ('object' === typeof location) {

fabriziomoscon Sep 23, 2014


passing null as location will make the condition true

typeof null // 'object'

I don't think that is what you want


fabriziomoscon commented Mar 12, 2015

Please see #70


fabriziomoscon commented Jun 11, 2015

Hi @SocalNick
this functionality is missing and it would be great if you could update the PR in top of master. The v1.0.0 of the library is published on npm and merged into master, feel free to adapt your changes and update your PR.

Hi @fabriziomoscon,

I'm no longer on the project that uses this and honestly, it's been so long, I'm not sure I have the context to rebase this on master a year after the contribution.


fabriziomoscon commented Jun 11, 2015

that is fair. Thanks for the immediate reply

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment