geo-timezone
v1.0.2
Published
geo-timezone
Downloads
6
Maintainers
Readme
geo-timezone
Returns timezone using a geographical coordinate.
- Install module
npm install geo-timezone --save
- Import the dependency
var geoTimezone = require('geo-timezone');
Use
var geoTimezone = require('geo-timezone');
geoTimezone.decodeByLngLat({
coordinates: [39.6034810, -119.6822510] // [ltn, lat]
}, function(err, result) {
console.log(result);
});
response:
{
dstOffset: 0,
rawOffset: -28800,
status: "OK",
timeZoneId: "America/Los_Angeles",
timeZoneName: "Pacific Standard Time"
}