Skip to content

thingsinjars/coordinate-tz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);

About

Node module to map latitude/longitude to an IANA timezone

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published