setting_system_clock_to_utc_gmt_timezone
This is an old revision of the document!
Table of Contents
System Clock Configuration to use UTC/GMT Timezone
On linux systems the system clock time zone should be set to UTC and ntpd should be running to keep the system clock synchronized. Proper configuration is described below (you must have root access to perform these procedures)
Setting time zone to UTC
- Edit /etc/syconfig/clock. It should look like this:
ZONE="UTC" UTC=true ARC=false
The ZONE line is the important line and it should be UTC or GMT.
- Check for the existence of /etc/localtime. If /etc/localtime is present, delete it.
Setting up network time protocol for clock synchronization
- Edit /etc/ntp.conf to set the time server. You can use any trusted time server (pool.ntp.org, time.nist.gov). My ntp.conf looks like this:
server pool.ntp.org
- Restart the ntpd service:
<root@machine>service restart ntpd
It may take a while for the clock to sync up.
- You can use ntpq -p to check connectivity to the time server and ntp's sync progress
- If the clock is off by a lot, you may need to use ntpdate to force a clock sync initially (ntpd must be stopped in order to use the ntp port)
[root@machine]# service ntpd stop Shutting down ntpd: [ OK ] [root@machine]# ntpdate time.nist.gov 29 Nov 18:37:26 ntpdate[17670]: adjust time server XXX.XXX.XXX.XXX offset 0.003698 sec [root@machine]# service ntpd start ntpd: Synchronizing with time server: [ OK ] Starting ntpd: [ OK ]
setting_system_clock_to_utc_gmt_timezone.1201709644.txt.gz · Last modified: 2008/01/30 11:14 by juckins