7.10server怎么修改timezone

Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
回复
liwubuntu
帖子: 29
注册时间: 2008-05-27 15:44

7.10server怎么修改timezone

#1

帖子 liwubuntu » 2008-06-03 15:24

请问在7.10server怎么修改timezone?
谢谢!
我的方法是:
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
这样就修改为上海的了,世界也自动改过来了
但是/etc/timezone这个文件没有改变。
在桌面版下面用图形界面修改timezone后/etc/timezone也做了相应的更改
请问怎么实现图形界面下的这个功能??
谢谢
头像
youqika
帖子: 720
注册时间: 2008-09-25 20:56

Re: 7.10server怎么修改timezone

#2

帖子 youqika » 2009-09-09 14:23

直接改/etc/timezone为Asia/Shanghai就行了
UCHIHA
运气是为白痴准备的
头像
木泥黑
帖子: 1339
注册时间: 2008-10-18 12:41

Re: 7.10server怎么修改timezone

#3

帖子 木泥黑 » 2009-09-15 16:36

比如“上海”

运行命令:tzselect 选择......shanghai

然后cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

同步时间

ntpdate cn.pool.ntp.org

cn.pool.ntp.org是位于中国的公共NTP服务器,用来同步你的时间。

禁止系统时间设为UTC

编辑 /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 //把yes改为no
VERBOSE=no
FSCKFIX=no

什么是UTC?

Local vs. UTC
首先重要的问题是你使用utc还是local time.
UTC(Universal Time Coordinated)=GMT(Greenwich Mean Time)
Local time 是你手表上的时间

传统的POSIX计算机(Solaris,bsd,unix)使用UTC格式
linux可以处理UTC时间和蹩脚的Windows所使用的local time

到底是使用UTC还是local time可以这样来确定:
如果机器上同时安装有Linux和Windows,建议使用local time
如果机器上只安装有Linux,建议使用utc
回复