Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

timezoner

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

timezoner

Node.js client library for accessing Google Time Zone API.

  • 0.0.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
129
decreased by-26.7%
Maintainers
1
Weekly downloads
 
Created
Source

node-timezone

Node.js client library for accessing Google Time Zone API. It provides time offset data for locations on the surface of the earth. Requesting the time zone information for a specific Latitude/Longitude pair will return the name of that time zone, the time offset from UTC, and the Daylight Savings offset.

Installation

$ npm install timezoner 

Usage

    var timezoner = require('timezoner');
	/* Request timezone with location coordinates */
	timezoner.getTimeZone(
		39.6034810, // Latitude coordinate
		-119.6822510, // Longitude coordinate
		function (err, data) {
			if (err) {
				console.log(err);
			} else {
				console.log(data);
			}
		}
	);

#####Response data:
{ "dstOffset" : 0.0, "rawOffset" : -28800.0, "status" : "OK", "timeZoneId" : "America/Los_Angeles", "timeZoneName" : "Pacific Standard Time" }

More details can be found on docs of Google TimeZone API.

License

(c) 2013 Justin John Mathews justinjohnmathews@gmail.com, MIT license.

Keywords

FAQs

Package last updated on 18 Jun 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc