implementing automatic timezone updates optimization guide on Ubuntu 22.04 with chrony
I'm writing unit tests and I recently switched to I'm experimenting with I've been struggling to get my Ubuntu 22.04 server to automatically update its timezone based on NTP (Network Time Protocol) servers using chrony. I have configured chrony to sync time with my preferred NTP server, but every time I restart the system, the timezone seems to revert to UTC and does not reflect the changes made in the /etc/localtime file. I have the following configuration in my /etc/chrony/chrony.conf: ```bash server ntp.ubuntu.com iburst pool 0.ubuntu.pool.ntp.org iburst ``` I also checked the /etc/timezone file, which correctly reflects 'America/New_York'. After editing it, I ran `dpkg-reconfigure tzdata` to ensure that the timezone is set properly. However, upon rebooting the server, the date command shows: ```bash $ date Thu Oct 19 00:00:00 UTC 2023 ``` I’ve also tried running `timedatectl set-timezone America/New_York`, but that doesn't seem to continue after reboot either. The output from `timedatectl` shows the following: ```bash $ timedatectl Local time: Thu 2023-10-19 00:00:00 UTC Universal time: Thu 2023-10-19 00:00:00 UTC RTC time: Thu 2023-10-19 00:00:00 Time zone: UTC (UTC, +0000) NTP enabled: yes NTP synchronized: yes ``` I have checked the systemd timesyncd service, and it's not interfering with chrony. The service is running, and `systemctl status chronyd` reports: ```bash ● chronyd.service - NTP client/server Loaded: loaded (/lib/systemd/system/chronyd.service; enabled; vendor preset: enabled) Active: active (running) ``` Despite all of this, I still encounter the same scenario after every reboot. Is there something I'm missing, or is there a configuration detail that I need to change to ensure that the timezone continues across reboots? Could this be an scenario with how chrony handles timezone settings? Any help would be greatly appreciated. I've been using Bash for about a year now. I'm open to any suggestions. This issue appeared after updating to Bash LTS. The project is a CLI tool built with Bash. I'd be grateful for any help.