I have a linux box, running Fedora Core 10, and the clock gets screwy after a few days of uptime. It keeps time just as one would expect, but then I notice the timestamps on incoming email are from the recent past. I log in to the machine, and if I run the date command repeatedly every 1 second (more or less), it takes 4-10 seconds for the output from date to change by 1 second.

2 Answers
2

Your system's clock is running slow. Run NTP on the machine, and it will be fine. I've had good experiences with chrony.

Since running NTP by itself didn't fix things, you should investigate whether your system's power source and the supply hardware are in good condition. An unusual ripple on that could cause weirdness. A dying CMOS battery could also cause the slowdown effect you're seeing, though I don't usually expect that on a system that's powered on (normally, it would lose time while off).

You can also set a cron job to sync the clocks to your favourite NTP server.
– sybreonSep 15 '09 at 1:41

3

Running a cron job to sync the clock is exactly poor the approach that NTP was invented to replace. That approach would jump the clock every time interval, and run slow otherwise. Events would appear to 'bunch' in time around the syncs.
– Phil MillerSep 15 '09 at 1:44