tzlookup
NodeJS Module for timezone lookup by geo location
Install
npm install tzlookup --save
Usage
const tz = tzNameAt; console;// => America/New_York
Also you can get all timezone names
var tzNames = tzNames; console;// => [ 'Europe/Amsterdam',// 'Europe/Andorra',// 'Europe/Athens',// 'Europe/Belgrade',// ...
API
tzNameAt(lat, lon)
lat
Required
Type: Number
Latitude – number between -90 and +90.
lon
Required
Type: Number
Longitude – number between -180 and +180.
Function with two arguments – latitude and longitude. Throws TypeError
if arguments is not a Number
and RangeError
if at least one of them is out of range.
tzNames
Returns the list of all known names of the timezones.
Lisense
MIT © Maxim Novikov