LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 690|回复: 3

关于时间与ntpdate

[复制链接]
发表于 2007-4-6 08:21:24 | 显示全部楼层 |阅读模式
debian sid,CMOS时间是北京时间,如果启动的时候网络不通则时间比实际时间早8个小时,如果启动的时候网络通,则时间正确,应该是ntpdate自动对时造成的吧?
我的/etc/default/rcS中设定UTC=no,或者yes都一样,还有别的地方的设置没
修改?
多谢!
发表于 2007-4-6 08:42:35 | 显示全部楼层
我这的两台双启机子,分别是sid/2000和sid/xp,debian下要tzconfig分别设成CST和UTC才能保证各系统下的时间一致,/etc/default/rcS都没改动,也许会这类似吧
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-4-6 10:46:11 | 显示全部楼层
另一台台式机则没这个问题,有点奇怪。
man tzconfig:

       The  Debian  GNU/Linux system gains its knowledge of this setting from the file /etc/default/rcS.  This file con-
       tains either the line UTC=yes, which indicates that the hardware clock is set to UTC, or  it  contains  the  line
       UTC=no,  which  declares  the hardware clock is set to Local Time. If these setting are correct, and the hardware
       clock is truly set as indicated, then configuring the proper timezone for the machine will cause the proper  date
       and  time  to  be  displayed.  If these are not set correctly, the the reported time will be quite incorrect. See
       hwclock(8) for more details on this topic.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-4-6 22:47:39 | 显示全部楼层
在/etc/init.d/hwclock.sh中的/sbin/hwclock添加--directisa后没问题了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表