coordinate-tz

0.1.2 • Public • Published

Coordinate - Time Zone map

Takes a latitude and longitude and returns the IANA Time Zone name of the timezone that coordinate is in.

This can be used with the zoneinfo module to get the current time at that coordinate

Example

var sys = require('util');
var CoordinateTZ = require('coordinate-tz'),
	zoneinfo = require('zoneinfo'),
    TZDate = zoneinfo.TZDate;


var latitude = 52.5,
	longitude = 13.3,
	query = CoordinateTZ.calculate(latitude,longitude);

var d = new TZDate();
d.setTimezone(query.timezone);
sys.puts(d);

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.222latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.222
0.1.15
0.1.02

Package Sidebar

Install

npm i coordinate-tz

Weekly Downloads

29

Version

0.1.2

License

none

Last publish

Collaborators

  • thingsinjars