Monday, August 05, 2013

Time and date setting in CentOS


View the current time and the timezone setting on the server by running the below command
#date

Steps to change the timezone settings.

 Make a backup of the current localtime file
#mv /etc/localtime /etc/localtime.bak

Create a new zone file setting using the below command. (Below example for India)
#ln -s /usr/share/zoneinfo/Asia/Calcutta /etc/localtime


Manually Set Data and Time using the following command
date -s "13 Feb 2015 10:30:00"