geo-timezone

1.0.2 • Public • Published

geo-timezone

Returns timezone using a geographical coordinate.

  1. Install module
npm install geo-timezone --save
  1. 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"
}

Package Sidebar

Install

npm i geo-timezone

Weekly Downloads

0

Version

1.0.2

License

MIT

Last publish

Collaborators

  • elvizcacho