LinuxSir.cn,穿越时空的Linuxsir!

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

求助时间问题。

[复制链接]
发表于 2008-1-3 13:17:58 | 显示全部楼层 |阅读模式
问题如下:

我的bios时间是按着正常的时间设定的,比如现在是13:10,我的bios就设置成13:10。

但是,我登录时的那个界面就是21:10。

我桌面的panel上面的时间显示是13:10(我在选项里面选择了use utc)

fender@PC-486:~$ cat /etc/timezone
Asia/Shanghai

fender@PC-486:~$ cat /etc/default/rcS
#
# /etc/default/rcS
#
# Default settings for the scripts in /etc/rcS.d/
#
# For information about these variables see the rcS(5) manual page.
#
# This file belongs to the "initscripts" package.

TMPTIME=0
SULOGIN=no
DELAYLOGIN=no
UTC=yes
VERBOSE=no
FSCKFIX=no
RAMRUN=no
RAMLOCK=no

fender@PC-486:~$ date
Thu Jan  3 21:10:09 CST 2008

fender@PC-486:~$ date --u
Thu Jan  3 13:10:15 UTC 2008

我应该如何设置才能在登录界面显示正确的时间呢?

在终端里面输入date显示的是bios时间吗?

指点一下。

以前好像没有这个问题啊。

我把utc=yes改成no以后还是这样。

怎么不起作用呢?
 楼主| 发表于 2008-1-3 13:41:04 | 显示全部楼层
回复 支持 反对

使用道具 举报

发表于 2008-1-3 13:50:30 | 显示全部楼层
不用这么麻烦吧?
回复 支持 反对

使用道具 举报

发表于 2008-1-3 14:24:48 | 显示全部楼层
我一般会这样做(redhat):
1)同ntp服务器同步时间
# ntpdate pool.ntp.org
2)删除系统的/etc/localtime文件,这样系统默认就会认为是utc的时间了。
# rm /etc/localtime
3)将系统时间保存
# hwclock -w
4)拷贝我需要的是去文件到/etc/localtime
# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
完成。
回复 支持 反对

使用道具 举报

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

本版积分规则

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