If you use a virtual machine, you might notice that its system time starts to lag after it has been powered on for a while. To solve this problem, it is useful to run an NTP (Network Time Prococol) client within the VM to have its time synchronised regularly.
On Windows, automatic time synchronisation is enabled by default and uses the server
On a Debian-based Linux distribution, you can install NTP with
apt install ntp and start it with
sudo systemctl start ntp.