NTP returning future time
I've noticed the time on a Linux server I'm maintaining is set to 8 hours in the future.
I thought this was weird so I checked ntpd
was on, and it is.
I thought this was even weirder so I checked the timezone,
$ ls -lah /etc/localtime
/etc/localtime -> /usr/share/zoneinfo/Australia/Brisbane
hmmm...
$ ntpdate -q 0.au.pool.ntp.org
server 119.148.81.6, stratum 2, offset -28768.189322, delay 0.06355
server 203.161.129.2, stratum 3, offset -28768.185683, delay 0.03165
server 202.158.218.239, stratum 3, offset -28768.187015, delay 0.04909
8 Sep 19:49:49 ntpdate[16434]: step time server 119.148.81.6 offset -28768.189322 sec
uhh... totally wrong. I figured there might be some kind of catch in ntpd
to not actually update the server time if it differed too greatly from the local time, so i set it manually:
$ date 090811492010
Wed Sep 8 11:45:00 EST 2010
Then ran date
again to see what happened:
$ date
Wed Sep 8 11:44:47 EST 2010
It went backwards 13 seconds! I figured ntpd
had ran successfully and adjusted the server time, being 13 seconds incorrect.
Subsequent checking of the date with ntpdate -q
, though, still said 19:49
for the correct time, and as such ntpd
reset the time to 19:49
within a matter of moments..
Does anyone know what I've done wrong?
Is this a dedicated virtual server, or a virtualized one? Some virtualization software can have a desync between the clocks on the host and guest OSs.