不解释,如下:
ubuntu@00-01:~$ sudo ntpdate clock.stdtime.gov.tw
10 Oct 14:55:30 ntpdate[10805]: step time server 220.130.158.72 offset 58537.743430 sec
ubuntu@00-01:~$ date
2012年 10月 10日 星期三 14:55:45 CST
以下内容参考网络:
2.将校准后的时间写入BIOS clock
ubuntu@00-01:~$ sudo hwclock -w
3.将较时加到计划任务里,让系统每天跟 ntp.ubuntu.com同步一次。
ubuntu@00-01:~$ sudo -s 【user】(缺省表示root用户)
root@00-01:~# crontab -e
no crontab for root - using an empty one
Select an editor. To change later, run 'select-editor'.
1. /bin/ed
2. /bin/nano <---- easiest
3. /usr/bin/vim.basic
4. /usr/bin/vim.tiny
Choose 1-4 [2]: 2
9 0 * * * /usr/sbin/ntpdate ntp.ubuntu.com;/sbin/hwclock -w
每天9点同步一次时间,保存推出
crontab: installing new crontab