changing your server over to GMT

Funny how it’s kind of hard to find documentation on this fairly simple task. The host I’m working with is CentOS 5, a variant of Redhat Enterprise 5. I use the following commands:

cat /usr/share/zoneinfo/GMT > /etc/localtime

That is actually what sets the time. It’s a binary file and is what our system tools and libraries look at.

vi /etc/sysconfig/clock

Edit the ZONE to be GMT. Mine looks like this:

ZONE=”GMT”
UTC=true
ARC=false

Verify it looks right with these commands.

date ; date -u ; /sbin/hwclock –show

Reboot, done!

This entry was posted in sysadmin 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>