#timezone #systemd #dbus #zoneinfo #geoclue

app automatic-timezoned

Automatically update system timezone based on location

194 stable releases

new 2.0.40 Nov 20, 2024
2.0.37 Oct 21, 2024
2.0.26 Jul 31, 2024
2.0.10 Mar 25, 2024
1.0.4 Jul 30, 2022

#50 in Unix APIs

Download history 313/week @ 2024-07-29 218/week @ 2024-08-05 214/week @ 2024-08-12 3/week @ 2024-08-19 166/week @ 2024-09-02 163/week @ 2024-09-09 219/week @ 2024-09-16 136/week @ 2024-09-23 169/week @ 2024-09-30 221/week @ 2024-10-07 210/week @ 2024-10-14 214/week @ 2024-10-21 1/week @ 2024-10-28 153/week @ 2024-11-04 142/week @ 2024-11-11

543 downloads per month

GPL-3.0 license

52KB
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

~21–32MB
~324K SLoC