【问题标题】:Timezone doesn't change after update to Asia/Tehran in CentOS 6.6在 CentOS 6.6 中更新到亚洲/德黑兰后时区不会改变
【发布时间】:2015-04-22 08:29:27
【问题描述】:
我已使用以下命令更改服务器时区:
cp /etc/localtime /root/old.timezone
rm /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Tehran /etc/localtime
但是当我检查服务器时区时,它显示:
$ date
---------
Wed Apr 22 08:15:03 UTC 2015
这是错误的。
还有/etc/localtime 输出是:
TZif2UTCTZif2UTC
UTC0
如何更改服务器时区?
OS : CentOS
Version : 6.6
【问题讨论】:
标签:
linux
date
time
centos
【解决方案1】:
我有一个 CentOS 6.6,我做了如下操作
# mv localtime localtime.old
# date
Thu Apr 23 13:14:36 UTC 2015
# ln -s /usr/share/zoneinfo/Asia/Tehran /etc/localtime
# ll localtime
lrwxrwxrwx. 1 root root 31 Apr 23 17:45 localtime -> /usr/share/zoneinfo/Asia/Tehran
# date
Thu Apr 23 17:45:36 IRDT 2015
正如你所见,它确实对我很有效,我用 root 用户完成了所有这些更改