- Type in terminal
timedatectl
It should show you a terminal interface contains several dates,
Local time,Universal timeandRTC time,
$ timedatectl
Local time: Sat 2024-03-09 17:29:25 UTC
Universal time: Sat 2024-03-09 17:29:25 UTC
RTC time: Sat 2024-03-09 17:29:25
Time zone: UTC (UTC, +0000)
System clock synchronized: yes
NTP service: n/a
RTC in local TZ: noyou should noticed the time difference, we are in the past now. This can happen when you restore the system from a snapshot, therefore the time indication will be incorrect for at least a while.
- Install ntp using apt
sudo apt install -y ntp- Restart the service
sudo systemctl restart ntp-
Now, check the time using
timedatectl, it should be correct -
Now you can do
sudo apt updatewith no issues.