Ubuntu / Nix terminalsudo ntpdate ntp.ubuntu.com
That sets time once and then it starts drifting into the wrong direction. To enable NTP service so that it constantly readjusts clock speed:
apt-get install chrony
Let it run for some time, then
chronyc sources
System-specific time drift is stored in /var/lib/chrony/drift .