By default NTP is not enabled on Ubuntu
admin@Vigor3912:~$ timedtimedatectl status
Local time: Wed 2023-03-01 18:45:33 +07
Universal time: Wed 2023-03-01 11:45:33 UTC
RTC time: Wed 2023-03-01 11:17:43
Time zone: Asia/Bangkok (+07, +0700)
System clock synchronized: no
NTP service: n/a
RTC in local TZ: no
Then we need enable it
sudo apt install ntp
sudo apt install systemd-timesyncd
sudo timedatectl set-ntp true
And done
admin@Vigor3912:~$ sudo timedatectl status
Local time: Wed 2023-03-01 18:47:19 +07
Universal time: Wed 2023-03-01 11:47:19 UTC
RTC time: Wed 2023-03-01 11:47:10
Time zone: Asia/Bangkok (+07, +0700)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
Leave a Reply