Linux Ubuntu无法用date函数设置时间

应该也有部分人见过Ubuntu时间不正确的问题,今天我也碰到了,时间的时间与北京时间相差4到5个小时,使用date -s 15:30正确了,但机器一重启时间又变了,Google了下,使用下面方面可以解决:

#ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localetime

将/etc/下原来的localetime删除,重新做了链接到/etc/localetime下面,呵呵,正常了!

时间同步服务器:

210.72.145.44

ntpdate 210.72.145.44

将当前的时间写入hwclock

hwclock -w

 

posted on 2013-02-19 17:14  DroidGaGa  阅读(338)  评论(0)    收藏  举报

导航