CentOS 6.8 & 7 - Change Timezone

Focus On Content  ~/ click me to toggle the navigation bar to the right

<img src="/img/2016/11/centos_logo.png" alt="centos_logo"> <img src="/img/2016/11/timezones.png" alt="timezones">

Here is a cheat sheet on changing the timezone in a linux system (CentOS 6.8 or 7):


# Remove the current timezone file
rm /etc/localtime

# Create a symbolic link to the new timezone you want
# ls -la /usr/share/zoneinfo/
# ls -la /usr/share/zoneinfo/US/

# For GMT
ln -s /usr/share/zoneinfo/GMT /etc/localtime
# For EST
ln -s /usr/share/zoneinfo/EST /etc/localtime
# For UTC
ln -s /usr/share/zoneinfo/UTC /etc/localtime
# For GMT
ln -s /usr/share/zoneinfo/GMT /etc/localtime
# For New York (Eastern)
ln -s /usr/share/zoneinfo/US/Eastern /etc/localtime
# For Central
ln -s /usr/share/zoneinfo/US/Central /etc/localtime
# For Mountain time
ln -s /usr/share/zoneinfo/US/Mountain /etc/localtime
# For Pacific time
ln -s /usr/share/zoneinfo/US/Pacific /etc/localtime

# Set Date and Time (as needed)
# MMDDHHmmYYYY
date 072522172010
hwclock --systohc

# If you're using NTPD Service
# CentOS 6.8
service ntpd stop && service ntpd start
# In CentOS 7 
systemctl stop ntpd && systemctl start ntpd

You may also be interested in NTP Service blog article here .

_Today's inspirational quote:_
[![epictetus](/img/2016/11/epictetus.png)](/img/2016/11/epictetus.png)
  • Men (people) are disturbed not by events but by their opinion about events.

  • Wealth consists not in having great possessions, but in having few wants.