Change Timezone in Red Hat and Centos Linux

Moderator: cah

Post Reply
cah
General of the Army / Fleet Admiral / General of the Air Force
General of the Army / Fleet Admiral / General of the Air Force
Posts: 1342
Joined: Sun Aug 17, 2008 5:05 am

Change Timezone in Red Hat and Centos Linux

Post by cah »

1. Remove /etc/localtime (or move to a temp filename)

Code: Select all

# rm /etc/localtime
2. Link the Pacific timezone file to /etc/localtime

Code: Select all

# ln -s /usr/share/zoneinfo/US/Pacific /etc/localtime 
CAH, The Great
cah
General of the Army / Fleet Admiral / General of the Air Force
General of the Army / Fleet Admiral / General of the Air Force
Posts: 1342
Joined: Sun Aug 17, 2008 5:05 am

Change Timezone in Red Hat and Centos Linux - III

Post by cah »

There's no /etc/sysconfig/clock in RHEL 7.x.
The symbolic link is sufficient according to some internet posts.
Or, admin can use 'timedatectl set-timezone' to set it.

Code: Select all

# timedatectl set-timezone America/Los_Angeles
Or,

Code: Select all

# timedatectl set-timezone US/Pacific
CAH, The Great
Post Reply