为什么我的时区更改不会反映在 date 命令中?

dhr*_*oid 1 linux centos

我将 /usr/share/zoneinfo/Asia/Kolkata 复制到 /etc/localtime。我还尝试在 /etc/sysconfig/clock 中编辑 ZONE,但我的默认时区仍然是 CEST 而不是 IST。

我已经检查过以确保 TZ 变量没有覆盖它。

我已经用谷歌搜索过了,发现http://www.redhat.com/advice/tips/timezone.htmlhttp://kezhong.wordpress.com/2010/03/08/change-timezone-on-centos- 5-4/但它没有帮助。

我没有想法了。我究竟做错了什么?

[root@dhroid ~]$ cat /etc/sysconfig/clock 
ZONE="Asia/Kolkata"
UTC=false
ARC=false
[root@dhroid ~]$ ls -al /etc/localtime 
lrwxrwxrwx 1 root root 32 Jul 19 16:10 /etc/localtime -> /usr/share/zoneinfo/Asia/Kolkata
[root@dhroid ~]$ env | grep TZ
[root@dhroid ~]$ date
Tue Jul 19 16:11:52 CEST 2011
[root@dhroid ~]$ 
Run Code Online (Sandbox Code Playgroud)

dhr*_*oid 6

我已经解决了这个问题。我所做的没有任何问题。一直以来,一切都是对的。问题出在已损坏的 tzdata 包上。一旦我从 yum 重新安装了软件包yum reinstall tzdata,它就起作用了!