wngx99 发表于 2010-11-16 15:16:36

VPS安装LNMP关于时区的问题

日期差了8个小时。。。
date -R 时间差了8个小时
date -u 时间是正确的。

CST显示时间是错误的
UTC时间是正确的。。。

郁闷中。。。:(

我试了好多方法都不行。。

licess 发表于 2010-11-16 19:50:32

回复 1# 的帖子

UTC + 8 = CST

cp /usr/share/zoneinfo/Asia/Taipei /etc/localtime
ntpdate cn.pool.ntp.org
试试

wngx99 发表于 2010-11-16 20:48:14

# cp /usr/share/zoneinfo/Asia/Taipei /etc/localtime
cp: `/usr/share/zoneinfo/Asia/Taipei' and `/etc/localtime' are the same file
# ntpdate cn.pool.ntp.org
17 Nov 04:45:03 ntpdate: step-systime: Operation not permitted

提示是这个。。。

有个疑问,军哥。。。我看到etc目录确实有个localtime的目录,可是却无法打开。
用VI 打开里面是乱码。。。。这是不是正常

licess 发表于 2010-11-16 21:48:00

回复 3# 的帖子

xen的吗?
在/etc/sysctl.conf 里
加上xen.independent_wallclock=1 ,再试试。

wngx99 发表于 2010-11-16 22:58:51

不是。。。是OpenVZ的。。。

wngx99 发表于 2010-11-17 09:52:38

母机有问题,联系客服给修正了。。。谢谢军哥。
页: [1]
查看完整版本: VPS安装LNMP关于时区的问题