LinuxSir.cn,穿越时空的Linuxsir!

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

系统时间老是不对,怎么回事?

[复制链接]
发表于 2007-10-29 13:14:55 | 显示全部楼层 |阅读模式
系统时间总是不对,调整好了以后
(好像是进过windows)再重启进入gentoo
时间就差了好几个小时
可是时区似乎没有设错阿

$cat /etc/timezone
Asia/Shanghai

谁知道是怎么回事?

顺便问一句:系统启动时的那些信息,在那里可以找到?
发表于 2007-10-29 17:02:02 | 显示全部楼层
# /etc/conf.d/clock

# Set CLOCK to "UTC" if your system clock is set to UTC (also known as
# Greenwich Mean Time).  If your clock is set to the local time, then
# set CLOCK to "local".  Note that if you dual boot with Windows, then
# you should set it to "local".

CLOCK="local"

# Select the proper timezone.  For valid values, peek inside of the
# /usr/share/zoneinfo/ directory.  For example, some common values are
# "America/New_York" or "EST5EDT" or "Europe/Berlin".

TIMEZONE="Asia/Shanghai"

# If you wish to pass any other arguments to hwclock during bootup,
# you may do so here.

CLOCK_OPTS=""

# If you want to set the Hardware Clock to the current System Time
# during shutdown, then say "yes" here.

CLOCK_SYSTOHC="yes"


### ALPHA SPECIFIC OPTIONS ###

# If your alpha uses the SRM console, set this to "yes".
SRM="no"

# If your alpha uses the ARC console, set this to "yes".
ARC="no"
CLOCK 设为local
TIMEZONE要设对。

Gentoo 把系统设置的文件放在/etc/conf.d/里面。
回复 支持 反对

使用道具 举报

发表于 2007-10-29 18:37:57 | 显示全部楼层
确定UTC已经改成local
1.date -s "2007-010-29 18:35"
#此命令用于修改正确的时间
2.hwclock --systohc
#此命令将系统时间写入BIOS
3.rm /etc/adjtime
#将时间校正文件删除。

另外最近win有种病毒专门干这个事情的,注意下。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-10-29 18:43:36 | 显示全部楼层
thanks a lot
回复 支持 反对

使用道具 举报

发表于 2007-10-29 18:47:14 | 显示全部楼层
手误,010改为10
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-10-29 21:16:34 | 显示全部楼层
Post by 三翻领
手误,010改为10


我就复制你的,010 也没错
呵呵
回复 支持 反对

使用道具 举报

发表于 2007-10-30 14:00:33 | 显示全部楼层
我是用ntp的client來自動更新的,放到rc-update default后每次開機都會更新一次,方便
回复 支持 反对

使用道具 举报

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

本版积分规则

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