node-timezone
Node.js client library for accessing Google Time Zone API.
It provides time offset data for locations on the surface of the earth.
Requesting the time zone information for a specific Latitude/Longitude pair will return the name of that time zone, the time offset from UTC, and the Daylight Savings offset.
Installation
$ npm install timezoner
Usage
var timezoner = require('timezoner');
timezoner.getTimeZone(
39.6034810,
-119.6822510,
function (err, data) {
if (err) {
console.log(err);
} else {
console.log(data);
}
}
);
#####Response data:
{
"dstOffset" : 0.0,
"rawOffset" : -28800.0,
"status" : "OK",
"timeZoneId" : "America/Los_Angeles",
"timeZoneName" : "Pacific Standard Time"
}
More details can be found on docs of Google TimeZone API.
License
(c) 2013 Justin John Mathews justinjohnmathews@gmail.com, MIT license.