[PLUG] Troubleshooting date and hwclock

Pranav Peshwe pranavpeshwe at gmail.com
Sat Jan 5 14:51:00 IST 2008

On Jan 5, 2008 8:26 AM, Santosh Dawara <sdawara at gmail.com> wrote:

> The "date" command returns the incorrect time.
> Steps to reproduce:
> 1. Set the Linux date/time correctly,

How ? using `date -s` ?

> 2. One week later, the clock has fallen behind by around 5 - 10minutes and
> has to be reset.

Was the machine up for the entire week since you set the time ?

> On running the following commands, I have pasted the output
> *# hwclock -r
> Thu 11 Oct 2007 03:19:50 PM IST  -0.015928 seconds
> *
> The hwclock reading is 5 minutes behind time.
> *# date
> Thu Oct 11 15:14:58 IST 2007
> *
> The date command shows 10 minutes behind time.

If the machine was up during the week, then AFAIK, `date` should definitely
show the correct time. Maybe, electronics guys can say more about whether
such a huge skew can occurr in timers.
The hwclock however can drift and is set to system time at poweroff/reboot..

I am not sure how the 5 min difference between system and hwclock time got
created. Is the 'adjust' feature of `hwclock` being used on the machine ?

Also, how many times was the test done ? Are you running the OS in a VM ?

Best regards,

You are nothing but a pack of neurons. -- Francis Crick.

More information about the Plug-mail mailing list