1

Unable to change the timezone to PST8PDT even after trying all the possible methods

[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

Any other method to change ?

[root@test ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.10 (Tikanga)
user173141
  • 127
  • 1
  • 2
  • 7

1 Answers1

3

You should not use the ancient style "timezones" like PST8PDT. These have been deprecated and are not even available at all since at least RHEL 6 (2010).

Instead, use the current ones, e.g. America/Los_Angeles.

export TZ=America/Los_Angeles
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime
Michael Hampton
  • 237,123
  • 42
  • 477
  • 940