設置時間:spa
date -s "2016-02-26 23:58:0"
恢復到正常時間:code
ntpdate pool.ntp.org
在使用ntpdate過程當中,遇到過問題:blog
7 Feb 00:25:30 ntpdate[5648]: Can't adjust the time of day: Invalid argument
或者:class
Error resolving –d: Name or service not known (-2) 7 Feb 00:15:25 ntpdate[5355]: Can't find host –d: Name or service not known (-2)
好像這個問題是由於年份比較大而致使的,我也沒找到合適的方法修復。只能從新設置一下相對較小的時間,而後從新ntpdate一下。date
date --set 101010 ntpdate pool.ntp.org