changing your server over to GMT

published on 2008-08-05 in computing

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!

Tags: howto servers sysadmin