When I run ntpdate, my system clock displays the time as an hour behind what it should be. I know that ntpdate does everything in UTC, so I'm guessing there's a timezone setting wrong and it's ignoring Daylight Savings Time, but I can't figure it out.
Here's what I've done so far:
ln -sf /usr/share/zoneinfo/EST /etc/localtime
to set the timezone- Set
UTC=true
in/etc/sysconfig/clock
so that DST will be automatically applied date -s hh:mm::ss
to set system clock correctlyhwclock -systohc --utc
to set the hardware clock correctly
At this point date
and hwclock
both display the correct time.
But if I then run ntpdate 0.us.pool.ntp.org
, the date
output is an hour behind what it should be.
I've looked at a dozen tutorials and can't figure out what I'm doing wrong. Does anyone have any ideas?
date -u
return the correct UTC time? If not, the clock isn't set correctly. Set the clock correctly before you do anything else. Then you know any remaining problems are due to time zone settings.