OT: Re: Computer loosing time

NoOp glgxg at sbcglobal.net
Fri May 16 15:55:16 UTC 2008

On 05/15/2008 06:47 PM, Mike Bird wrote:
> On Thu May 15 2008 16:40:41 NoOp wrote:
>> If your OS is relying on _the system clock_, and the clock is losing
>> time, then it will use and report the time according to the system
>> clock. If you have Ubuntu set for something other than UTC, it will
>> periodically go out and get the time from the system clock. You'll see
>> this option on install; whether to use the system clock or use UTC. Post
>> the output of:
> Linux takes the time from the system clock at boot, and writes
> it back at shutdown.  While Linux is running the clock is maintained
> by interrupts from a motherboard timer.

In the case where the system is set to use UTC, with a working network
connection at boot, Ubuntu goes out and gets the time from Canonical by
default. For example, on the laptop that has the dead CMOS battery I
booted without changing the clock. If I do 'sudo hwclock -r' it shows:

Thu 31 Dec 1987 04:13:28 PM PST -0.611754 seconds

However, my calendar, my logs, etc., all show the correct time: Friday
May 16 08:13:28 AM etc. From that point onward Ubuntu may rely on
interupts etc., for the time if I've not set the system to use ntp I
suppose, I've not looked at it further.

Now the interesting part; if I reboot again without a network
connection, I see that the bios clock has been set to the proper date,
and Ubuntu comes back up the correct May 16th time. Which proves your
point that linux writes the time back at shut down. I learned something
new - thanks!

Note: if I bring up Ubuntu on the dead CMOS (ala 31 Dec 1987) without a
network connection, Ubuntu comes up with the bios time setting (31 Dec
1987), as expected. However, before it completes the desktop, it does
then provide a popup telling me:

The computer clock appears to be wrong
The session might encounter issues if the computer clock
is not properly configured. Please consider adjusting it.
Current date is 12/31/1987
	Ignore		Adjust the Clock

But then of course, I have the "Could not authenticate" bug (Hardy) on
that machine, so I can't adjust it from the popup & can't get past the
goony bird spash screen...

None of this probably helps Rashkae, but for me it was an interesting
experiment :-)

More information about the ubuntu-users mailing list