Linux时区不变

即使尝试了所有可能的方法,也无法将时区更改为PST8PDT

[root@test ~]# date Tue May 10 07:24:18 EDT 2016 [root@test ~]# ll /etc/localtime lrwxrwxrwx 1 root root 27 May 10 06:35 /etc/localtime -> /usr/share/zoneinfo/PST8PDT [root@test ~]# cat /etc/profile | grep TZ export TZ=PST8PDT [root@test ~]# date Tue May 10 07:24:57 EDT 2016 [root@test ~]# echo $TZ PST8PDT [root@test ~]# ls /root/.profile ls: /root/.profile: No such file or directory 

任何其他方法改变?

 [root@test ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.10 (Tikanga) 

你不应该使用像PST8PDT这样的古代风格的“时区”。 至less从RHEL 6(2010)开始,这些已经被弃用,甚至根本不可用。

相反,使用目前的,如America/Los_Angeles

 export TZ=America/Los_Angeles ln -snf /usr/share/zoneinfo/$TZ /etc/localtime