Skip to content

Node.JS Module for Timezone Lookup by Location

Notifications You must be signed in to change notification settings

gijs/tz-lookup

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tz-lookup

This is a little module that allows you to look up the current time zone of a location, given it's latitude and longitude. I wrote it because the existing Node module that does this (tzwhere) was far too slow to be useful in a production setting. This module attempts to ameliorate that.

Usage

To install:

npm install tz-lookup

To use:

> var tzLookup = require("tz-lookup")
> tzLookup(42.7235, -73.6931, function(err, tz) {
>   console.log(tz)
> })
{ tzid: "America/New_York", abbr: "EDT", offset: -4 }

The data file is only loaded on-demand, so the first call to tzLookup() will take a while, but subsequent calls will go quite quickly.

About

Node.JS Module for Timezone Lookup by Location

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published