How to Change Time Zone for System Date on CentOS!

Here’s how to change time zone for system date on your CentOS web server:

Go into the directory zoneinfo:

cd /usr/share/zoneinfo

Then find the right zone file for you such as for me Los Angeles is for PST (Pacific Standard Time), which is here:

/usr/share/zoneinfo/America/Los_Angeles

Then simply copy over that file to /etc/localtime like this:

cp /usr/share/zoneinfo/America/Los_Angeles /etc/localtime

Run the date command:

date

and you should get something like:

Wed Jul 6 16:56:47 PDT 2011

Instead of the other time zone you were getting.

Share

Recommended CentOS



This entry was posted in CentOS and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Related News and Resources