#timezone #systemd #dbus #zoneinfo #geoclue

app automatic-timezoned

Automatically update system timezone based on location

165 stable releases

2.0.11 Apr 12, 2024
2.0.10 Mar 25, 2024
2.0.4 Feb 28, 2024
1.0.152 Feb 18, 2024
1.0.4 Jul 30, 2022

#45 in Unix APIs

Download history 5/week @ 2023-12-31 18/week @ 2024-01-07 33/week @ 2024-01-14 8/week @ 2024-01-28 4/week @ 2024-02-04 138/week @ 2024-02-11 675/week @ 2024-02-18 344/week @ 2024-02-25 271/week @ 2024-03-03 410/week @ 2024-03-10 96/week @ 2024-03-17 162/week @ 2024-03-24 74/week @ 2024-03-31 140/week @ 2024-04-07 15/week @ 2024-04-14

402 downloads per month

GPL-3.0 license

50KB
111 lines

Automatic Timezone Daemon

Crates.io Build Status dependency status

A Linux daemon to automatically update the system timezone based on location.

How It Works

  1. The current location is retrieved from GeoClue
  2. The timezone of the current location is determined using tzf-rs
  3. The timezone is updated via systemd-timedated
  4. Then, the daemon waits for the location updated signal from GeoClue, and repeats from step 1 when it happens

Note: The timezone choice may not be accurate if very close to a timezone border due to tzf-rs using simplified shape data.

Requirements

Please see the examples/ directory for sample configurations.

Configuration

$ automatic-timezoned --help
Automatically update system timezone based on location

Usage: automatic-timezoned [OPTIONS]

Options:
  -l, --log-level <LOG_LEVEL>  Log level filter. See <https://docs.rs/env_logger> for syntax [env: AUTOTZD_LOG_LEVEL=] [default: info]
  -h, --help                   Print help
  -V, --version                Print version

Packages

Packaging status

Development

Build

cargo build --release

Test

cargo test

Alternatives

This service depends on the tzf-rs package which bundles timezones and their geographical borders, here are some alternatives which have made different trade-offs for performance and accuracy:

License

GNU General Public License v3.0

Dependencies

~23–35MB
~362K SLoC