Set current time via ntp

From snippet wiki
Jump to navigation Jump to search

In case your linux system suddenly jumps back or forward in time and it is a gap much too big, the ntp daemon alone won't cope with it.

Run this line once:

ntpd -q -g

The -g allows for big jumps in time and the -q says run just for this moment and return.


For windows you can trigger ntp time via

net time \\ /set /yes

where is the IP number or perhaps network name of your time server. You will need a command shell with admin rights for this.