All Projects → evansiroky → Node Geo Tz

evansiroky / Node Geo Tz

Licence: mit
A node.js module to find the timezone based on gps coordinates

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Node Geo Tz

Soulvercore
A powerful Swift framework for evaluating mathematical expressions
Stars: ✭ 245 (+35.36%)
Mutual labels:  datetime, timezone
Date
A date and time library based on the C++11/14/17 <chrono> header
Stars: ✭ 2,389 (+1219.89%)
Mutual labels:  datetime, timezone
Delorean
Delorean: Time Travel Made Easy
Stars: ✭ 1,793 (+890.61%)
Mutual labels:  datetime, timezone
Luatz
Time, Date and Timezone library for lua
Stars: ✭ 92 (-49.17%)
Mutual labels:  datetime, timezone
nepali-datetime
Python's core datetime inspired nepali datetime (BS date & NPT) package 🇳🇵
Stars: ✭ 36 (-80.11%)
Mutual labels:  datetime, timezone
sqlalchemy-utc
SQLAlchemy type to store aware datetime values
Stars: ✭ 87 (-51.93%)
Mutual labels:  datetime, timezone
Time
Building a better date/time library for Swift
Stars: ✭ 1,983 (+995.58%)
Mutual labels:  datetime, timezone
hs-hourglass
efficient and simpler time API for haskell
Stars: ✭ 43 (-76.24%)
Mutual labels:  datetime, timezone
Dateutils
nifty command line date and time utilities; fast date calculations and conversion in the shell
Stars: ✭ 458 (+153.04%)
Mutual labels:  datetime, timezone
Anydate
Swifty Date & Time API inspired from Java 8 DateTime API.
Stars: ✭ 178 (-1.66%)
Mutual labels:  datetime, timezone
Pytime
PyTime is an easy-use Python module which aims to operate date/time/datetime by string.
Stars: ✭ 140 (-22.65%)
Mutual labels:  datetime
Holidaydatetime
A php class to check Japanese holiday and weekend. 土日祝日を判定するphpクラス。
Stars: ✭ 153 (-15.47%)
Mutual labels:  datetime
Anytime
Anything to POSIXct or Date Converter
Stars: ✭ 137 (-24.31%)
Mutual labels:  datetime
Jstz
🌐Timezone detection for JavaScript
Stars: ✭ 154 (-14.92%)
Mutual labels:  timezone
Tail.datetime
A lightweight, translat- and configurable Open Source DateTime Picker, written in pure vanilla JavaScript!
Stars: ✭ 139 (-23.2%)
Mutual labels:  datetime
Luxon
⏱ A library for working with dates and times in JS
Stars: ✭ 11,926 (+6488.95%)
Mutual labels:  datetime
Libfaketime
libfaketime modifies the system time for a single application
Stars: ✭ 1,932 (+967.4%)
Mutual labels:  datetime
Eztime
ezTime — pronounced "Easy Time" — is a very easy to use Arduino time and date library that provides NTP network time lookups, extensive timezone support, formatted time and date strings, user events, millisecond precision and more.
Stars: ✭ 173 (-4.42%)
Mutual labels:  datetime
Datetimeseer
A painless way to pick future time.
Stars: ✭ 159 (-12.15%)
Mutual labels:  datetime
Date Picker
📅 Custom responsive date picker widget for Android, written in Kotlin.
Stars: ✭ 146 (-19.34%)
Mutual labels:  datetime

node-geo-tz

npm version Build Status Dependency Status Test Coverage

The most up-to-date and accurate node.js geographical timezone lookup package. It's fast too!

Install

npm install geo-tz

Usage

    const geoTz = require('geo-tz')

    geoTz(47.650499, -122.350070)  // ['America/Los_Angeles']
    geoTz(43.839319, 87.526148)  // ['Asia/Shanghai', 'Asia/Urumqi']

API Docs:

As of Version 5, the API now returns a list of possible timezones. There are certain coordinates where the timekeeping method will depend on the person you ask. Also, another case where 2 or more timezones could be returned is when a request is made with a coordinate that happens to be exactly on the border between two or more timezones.

geoTz(lat, lon)

Returns the timezone names found at lat, lon. The timezone names will be the timezone identifiers as defined in the timezone database. The underlying geographic data is obtained from the timezone-boudary-builder project.

This library does an exact geographic lookup which has tradeoffs. It is perhaps a little bit slower that other libraries, has a larger installation size on disk and cannot be used in the browser. However, the results are more accurate than other libraries that compromise by approximating the lookup of the data.

The data is indexed for fast analysis by caching subregions of geographic data when a precise lookup is needed.

geoTz.setCache(options)

By default, geoTz lazy-loads exact lookup data into an unexpiring cache. The setCache method can be used to change the caching behavior using the following options:

  • preload - if set to true will attempt to cache all files (slow startup time and requires lots of memory)
  • store - offload the cache to a custom storage solution (must be compatible with the Map api)

Examples:

geoTz.setCache({ preload: true }) // preloads all files

let map = new Map();
geoTz.setCache({ store: map }) // pass a Map-like storage object

Limitations

This library is not intended to be used in the browser due to the large amount of files that are included to perform exact geographic lookups.

An Important Note About Maintenance

Due to the ever-changing nature of timezone data, it is critical that you always use the latest version of this package. If you use old versions, there will be a few edge cases where the calculated time is wrong. If you use greenkeeper, please be sure to specify an exact target version so you will always get PR's for even patch-level releases.

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].