First check current timezone used by your system using date command.
# date Thu Jan 2 05:12:25As per above example our system timezone is set to EST.EST 2015
Change TimeZone in CentOS/RHEL 7
In CentOS/RHEL 7 we use timedatectl command to change current timezone of system. First use following command to list all timezones# timedatectl list-timezones
Now use following command to change timezone to America/Los_Angeles.
# timedatectl set-timezoneAmerica/Los_Angeles
Change TimeZone in CentOS/RHEL 6/5
To change timezone on CentOS/RHEL 6/5 we can simply link /etc/localtime file with correct timezone configuration file. For example we are setting America/Los_Angeles as our local system timezone.# mv /etc/localtime /root/localtime.old
# ln -s/usr/share/zoneinfo/America/Los_Angeles /etc/localtime
Source : http://tecadmin.net
No comments:
Post a Comment