Package Exports
- timezoner
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (timezoner) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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');
/* Request timezone with location coordinates */
timezoner.getTimeZone(
39.6034810, // Latitude coordinate
-119.6822510, // Longitude coordinate
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.