Socket
Socket
Sign inDemoInstall

geo-tz

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

geo-tz

Node.js timezone lookup from tz_world data


Version published
Weekly downloads
93K
increased by0.13%
Maintainers
1
Weekly downloads
 
Created
Source

node-geo-tz

npm version Build Status Dependency Status Test Coverage

A node.js module to find the timezone based on gps coordinates

Install

npm install geo-tz

Usage

var geoTz = require('geo-tz')

var name        = geoTz.tz(47.650499, -122.350070)                                // 'America/Los_Angeles'
var now         = geoTz.tzMoment(47.650499, -122.350070)                          // moment-timezone obj
var specifcTime = geoTz.tzMoment(47.650499, -122.350070, '2016-03-30T01:23:45Z')  // moment-timezone obj

API Docs:

.tz(lat, lon)

Returns timezone name found at lat, lon. Returns null if timezone could not be found at coordinate.

.tzMoment(lat, lon, [dateTime])

Returns a moment-timezone object found at lat, lon. Returns null if timezone could not be found at coordinate. If dateTime is omitted, the moment-timezone will have the current time set. If dateTime is provided, moment-timezone will be set to the time provided according to the timezone found.

Keywords

FAQs

Package last updated on 21 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc