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.

Windows

For windows you can trigger ntp time via

net time \\10.20.30.40 /set /yes

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