[CentOS] Incorrect time from NTP

Associate
Joined
17 Jan 2004
Posts
483
Hopefully this is an easy fix for someone here.

I've installed ntpd on a remote server running CentOS 5.5 but, after copying /usr/share/zoneinfo/Europe/London to /etc/localtime and performing an ntpd -q I am getting a system date which _is_ in BST but is 8 hours fast.

Someone suggested I set the date and time manually but this is quickly going to be overwritten as ntpd is running.

Here were the steps performed as root,
yum -y install ntp
chkconfig --levels 2345 ntp on
cp /usr/share/zoneinfo/Europe/London /etc/localtime
ntpd -q uk.pool.ntp.org

I have not modified /etc/ntp.conf so I believe that following a reboot the CentOS time severs are now being queried.

Can anyone spot a glaring omission on my part? :(
 
Have you tried running system-config-date to set the timezone instead? You might need to change /etc/sysconfig/clock as well if doing it manually but this command should take care of it.
 
Thanks for the replies.

The system is running on a VPS and I think the OS image was pretty minimal.

/etc/sysconfig/clock doesn't exist and according to yum I will have to install 95 additional packages if I want to put system-config-date on. Not what I was looking for :o

Previously, I had set the time manually using date --set='vars_in_here' but it quickly reverted to being out of sync by around 8 hours. However a simple date MMDDhhmm (Month Day hour minute) has solved it. I don't understand why.
 
Back
Top Bottom