This is working on Ubuntu 24.10. Also, this should work on a recent Debian based distro.
First, make sure you are getting automatic date and time updates via NTP:
sudo systemctl enable systemd-timesyncd.service
sudo systemctl start systemd-timesyncd.service
sudo timedatectl set-ntp true
Second, set your preferred time zone. For example, for New York (USA):
sudo timedatectl set-timezone "America/New_York"
This howto is part of a larger collection of howtos maintained by the author (mostly for his own reference). The source code for the current howto in plain Markdown is available on GitHub. If you have a GitHub account, you can jump straight in, and suggest edits or improvements via the link at the bottom of the page (Improve this page).
made with ❤ by Valera Rozuvan