2 releases

Uses old Rust 2015

0.1.1 Apr 24, 2015
0.1.0 Apr 9, 2015

#22 in #latitude-longitude

Download history 67/week @ 2025-03-28 49/week @ 2025-04-04 65/week @ 2025-04-11 56/week @ 2025-04-18 152/week @ 2025-04-25 136/week @ 2025-05-02 88/week @ 2025-05-09 82/week @ 2025-05-16 119/week @ 2025-05-23 61/week @ 2025-05-30 96/week @ 2025-06-06 60/week @ 2025-06-13 69/week @ 2025-06-20 73/week @ 2025-06-27 52/week @ 2025-07-04 30/week @ 2025-07-11

242 downloads per month

Apache-2.0

290KB
234 lines

Compute timezones of points on the Earth.

This is a direct port of bradfitz/latlong, and hence the same bonuses/caveats apply:

It tries to have a small binary size (~360 KB), low memory footprint (~1 MB), and incredibly fast lookups (~0.5 microseconds). It does not try to be perfectly accurate when very close to borders.

Source.

Installation

Add the following to your Cargo.toml:

[dependencies]
tz-search = "0.1"

Examples

assert_eq!(tz_search::lookup(-33.79, 151.17).unwrap(),
           "Australia/Sydney");

// in the ocean
assert_eq!(tz_search::lookup(0.0, 0.0), None);

tz-search

Build Status

Map a latitude/longitude point to the timezone it lies in.

This is a direct port of bradfitz/latlong.

Documentation, crates.io.

Dependencies

~1–1.3MB
~24K SLoC