Changing server time/date & timezone

SSH to your server as root and change directory to:

Perform an ls –l on the directory and you will see a variety of timezones. To set the server’s local timezone, you will want to copy the timezone file for your timezone and replace the file called /etc/localtime.

For example:
cp EST /etc/localtime

Now that you have configured the proper timezone for your server, you will want to have the time adjusted for your timezone. Perform the following command to have your server contact a remote NTP server and re-establish the proper time:

rdate -s

Afterwards, you will want to set your hardware clock to the same as well. Use the following command to do this:
/sbin/hwclock –systohc

And that’s it you’ve sucessfully set the date & time as per your preferance.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s