Getting started

Installation

pip install timezonefinder

in case you are using pytz, also require it via its extra to avoid incompatibilities (e.g. due to updated timezone names):

pip install timezonefinder[pytz]

for improved speed also install the optional dependency numba via its extra (also check the performance chapter):

pip install timezonefinder[numba]

For installation within a Conda environment see instructions at conda-forge feedstock

Dependencies

python3.8+, numpy, h3, cffi

optional: numba

(cf. pyproject.toml)

Basic Usage

from timezonefinder import TimezoneFinder

tf = TimezoneFinder()  # reuse

query_points = [(13.358, 52.5061), ...]
for lng, lat in query_points:
    tz = tf.timezone_at(lng=lng, lat=lat)  # 'Europe/Berlin'

All available features of this package are explained HERE.

Examples for common use cases can be found HERE.