#local-time #timezone #system-timezone

app tzupdate

Set the system timezone based on IP geolocation

2 stable releases

3.1.0 Sep 28, 2023
3.0.0 May 12, 2023

#8 in #local-time

Download history 22/week @ 2025-11-22 26/week @ 2025-12-13 25/week @ 2026-01-03 29/week @ 2026-01-10 61/week @ 2026-01-17 78/week @ 2026-01-24 8/week @ 2026-01-31 25/week @ 2026-02-07 12/week @ 2026-02-14 7/week @ 2026-02-21 41/week @ 2026-02-28 54/week @ 2026-03-07

123 downloads per month

MIT license

14KB
272 lines

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.

Dependencies

~13–28MB
~480K SLoC