All Projects → justin-john → node-timezone

justin-john / node-timezone

Licence: other
Node.js client library for accessing Google Time Zone API.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to node-timezone

Bikedeboa
A (Progressive) Web App to find, map and review bike parkings in the cities of Brazil.
Stars: ✭ 54 (+125%)
Mutual labels:  google-maps-api
Googleway
R Package for accessing and plotting Google Maps
Stars: ✭ 187 (+679.17%)
Mutual labels:  google-maps-api
google maps
🗺 An unofficial Google Maps Platform client library for the Rust programming language.
Stars: ✭ 40 (+66.67%)
Mutual labels:  google-maps-api
Django Easy Maps
🗺 Google Maps with easy!
Stars: ✭ 129 (+437.5%)
Mutual labels:  google-maps-api
Load Google Maps Api
🌏 A lightweight Promise-returning helper for loading the Google Maps JavaScript API
Stars: ✭ 166 (+591.67%)
Mutual labels:  google-maps-api
Optimal Roadtrip Usa
Contains maps for the article, "Computing the optimal road trip across the U.S." and similar articles
Stars: ✭ 221 (+820.83%)
Mutual labels:  google-maps-api
Maplace.js
A Google Maps Javascript plugin for jQuery.
Stars: ✭ 1,021 (+4154.17%)
Mutual labels:  google-maps-api
jquery-google-reviews
simple jquery Plugin that utilizes Google API to get data from a Place on Google Maps
Stars: ✭ 33 (+37.5%)
Mutual labels:  google-maps-api
Google Maps
Google Maps Web Services API wrapper for .NET
Stars: ✭ 171 (+612.5%)
Mutual labels:  google-maps-api
ctt
ctt postal codes into MySQL with latitude and longitude from google
Stars: ✭ 33 (+37.5%)
Mutual labels:  google-maps-api
Google Maps Autocomplete
Autocomplete input component and directive for google-maps built with angular and material design | ANGULAR V9 SUPPORTED
Stars: ✭ 134 (+458.33%)
Mutual labels:  google-maps-api
React Native Google Maps Directions
🚕 Get direction using Google Maps in React Native 🚗
Stars: ✭ 160 (+566.67%)
Mutual labels:  google-maps-api
google-maps-places-geolocation-for-your-ionic-app
Ionic example app of how to add Google maps, places, geolocation and related features into an Ionic Framework app.
Stars: ✭ 13 (-45.83%)
Mutual labels:  google-maps-api
Complete Google Map Api Tutorial
Learn How to use Google Map API for Android from Basic to Advance with complete examples.
Stars: ✭ 104 (+333.33%)
Mutual labels:  google-maps-api
geometry-library
PHP Geometry Library provides utility functions for the computation of geometric data on the surface of the Earth. Code ported from Google Maps Android API.
Stars: ✭ 132 (+450%)
Mutual labels:  google-maps-api
Magento2 Google Address Lookup
Provides an address lookup service on a Magento 2 store powered by the Google Places API
Stars: ✭ 46 (+91.67%)
Mutual labels:  google-maps-api
Meteor Google Maps
🗺 Meteor package for the Google Maps Javascript API v3
Stars: ✭ 198 (+725%)
Mutual labels:  google-maps-api
network-map
NYC Mesh map
Stars: ✭ 18 (-25%)
Mutual labels:  google-maps-api
GoogleMaps-CustomInfoWindow-Button
interactive custom InfoWindow for Google Maps
Stars: ✭ 14 (-41.67%)
Mutual labels:  google-maps-api
laravel-5.3-app
🗺️ Get started with Laravel 5.3, Vue.js and Google Maps API
Stars: ✭ 28 (+16.67%)
Mutual labels:  google-maps-api

node-timezone

Build Status

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"
}

You can pass in an optional options as a last argument, it can be useful to pass Optional Parameters like key and language. The language parameter is used to the language in which to return results and key parameter is the API Key which identifies your application for purposes of quota management. Please see API Key to know more about key parameter.

	timezoner.getTimeZone(
		39.6034810,
		-119.6822510,
		function (err, data) {
			if (err) {
				console.log(err);
			} else {
				console.log(data);
			}
		},
		{ language: 'es', key: 'YOUR_API_KEY' }
	);

The response will now be localized to Spanish.

{
   "dstOffset" : 3600.0,
   "rawOffset" : -28800.0,
   "status" : "OK",
   "timeZoneId" : "America/Los_Angeles",
   "timeZoneName" : "Hora de verano del Pacífico"
}

You can find more details about response and different status of response from Time Zone Responses.

Notes

Removed the sensor parameter in options. It is no longer required by Google Time Zone API.

License

The MIT License (MIT)

Copyright (c) 2013-2018 Justin John Mathews [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].