cdown/tzupdate

Set the system timezone based on IP geolocation.

Rust

241

248 commits

updated Sep 1, 2025

See the code

README

tzupdate | Tests

tzupdate is a fully automated utility to set the system time using geolocation.

Features

  • Small, easy to understand codebase
  • Queries multiple geolocation services in parallel and returns the first with a successful result
  • Protects against directory traversal and invalid results when linking /etc/localtime

Installation

cargo install tzupdate

Usage

# tzupdate
Set system timezone to Europe/London.

Internally, this geolocates you, gets the timezone for that geolocation, and then updates the system's local time zone.

You can see what tzupdate would do without actually doing it by passing -p, and specify an alternative IP address by using -i. This is not an exhaustive list of options, see tzupdate --help for that.

clock
command-line
command-line-tool
geolocation
geolocation-api
linux
mit-license
rust
rust-lang
time
time-clock
timezone
timezone-picker

Contributors

cdown

218 commits

dependabot[bot]

27 commits

jbrockmendel

1 commits

cdown/tzupdate

Set the system timezone based on IP geolocation.

Rust

241

248 commits

updated Sep 1, 2025

See the code

README

tzupdate | Tests

tzupdate is a fully automated utility to set the system time using geolocation.

Features

  • Small, easy to understand codebase
  • Queries multiple geolocation services in parallel and returns the first with a successful result
  • Protects against directory traversal and invalid results when linking /etc/localtime

Installation

cargo install tzupdate

Usage

# tzupdate
Set system timezone to Europe/London.

Internally, this geolocates you, gets the timezone for that geolocation, and then updates the system's local time zone.

You can see what tzupdate would do without actually doing it by passing -p, and specify an alternative IP address by using -i. This is not an exhaustive list of options, see tzupdate --help for that.

clock
command-line
command-line-tool
geolocation
geolocation-api
linux
mit-license
rust
rust-lang
time
time-clock
timezone
timezone-picker

Contributors

cdown

218 commits

dependabot[bot]

27 commits

jbrockmendel

1 commits

Languages

Rust

100.0%