Skip to content

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

License

Notifications You must be signed in to change notification settings

windycom/node-geo-tz

This branch is 119 commits behind evansiroky/node-geo-tz:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4b65917 Â· Apr 13, 2018
Apr 13, 2018
Nov 27, 2016
Apr 12, 2018
Mar 30, 2016
Nov 27, 2016
Feb 11, 2017
Nov 6, 2017
Mar 31, 2016
Apr 13, 2018
Apr 13, 2018
Apr 12, 2018
Apr 12, 2018

Repository files navigation

node-geo-tz

npm version Build Status Dependency Status Test Coverage

The most up-to-date and accurate node.js geographical timezone lookup package. It's fast too!

Install

npm install geo-tz

Usage

var geoTz = require('geo-tz')

geoTz(47.650499, -122.350070)  // 'America/Los_Angeles'

API Docs:

As of Version 4, there is now only one API call and no dependency on moment-timezone.

geoTz(lat, lon)

Returns the timezone name found at lat, lon. The timezone name will be a timezone identifier as defined in the timezone database. The underlying geographic data is obtained from the timezone-boudary-builder project.

This library does an exact geographic lookup which has tradeoffs. It is perhaps a little bit slower that other libraries, has a large installation size on disk and cannot be used in the browser. However, the results are more accurate than other libraries that compromise by approximating the lookup of the data.

The data is indexed for fast analysis with automatic caching (with time expiration) of subregions of geographic data for when a precise lookup is needed.

An Important Note About Maintenance

Due to the ever-changing nature of timezone data, it is critical that you always use the latest version of this package. If you use old versions, there will be a few edge cases where the calculated time is wrong. If you use greenkeeper, please be sure to specify an exact target version so you will always get PR's for even patch-level releases.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%