[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: hwclock incorrectly set ?



On Sat 10 Mar 2018 at 21:19:00 (-0800), Rick Thomas wrote:
> 
> On Mar 10, 2018, at 7:39 PM, Charles E. Blair <c-blair@illinois.edu> wrote:
> 
> > Thank you to Rick Thomas and the many others trying
> > to help me with my "hwclock incorrectly set".
> > 
> > --------------------------------------------------
> > 
> > According to aptitude, I do not have ntp installed.
> > 
> > --------------------------------------------------
> > 
> > My system is indeed a dual-boot (not counting recovery
> > options) of windows and linux.  However, I doubt I use
> > the windows partition more than two or three times a
> > year.  I used default options with the installer.
> > Perhaps these excerpts from grub.cfg will help:
> > 
> > menuentry 'Debian GNU/Linux' $menuentry_id_option 'gnulinux-simple
> > menuentry 'Windows 7 (on /dev/sda1)
> > menuentry 'Windows 7 (on /dev/sda2)'
> > menuentry 'Windows Recovery Environment (on /dev/sda3)'
> > 
> > --------------------------------------------------
> > 
> > The /etc/adjtime file:
> > 
> > 0.009639 1512909359 0.000000
> > 1512909359
> > LOCAL
> > 
> > --------------------------------------------------
> 
> So…
> Your hardware clock is set to your local timezone (the “LOCAL” in /etc/adjtime).  This is normal when it’s dual-boot.

Why? Windows has made big strides with supporting UTC in the RTC,
so this view is real just a legacy view.

Take a look at the Date and Time Settings page in Windows, and
set the option there for RTC is UTC. Unset options for DST
adjustments and any time adjustments, and if it concerns you
set a TimeZone for Windows to display.

It's taken years for the penny to drop, but I think MS has
actually realised that running a RTC on local time is
fundamentally broken (spelled impossible). As usual, many of
their problems along the way have been caused by a reluctance
to bite the bullet in one go.

> And whenever you boot Windows, your hardware clock may get reset, thus confusing Debian the next time you boot Debian.  But you say you don’t boot Windows very often, so…

Which can be enough to screw up the work that ntp does (see below).

> I’m not sure whether either of these facts can explain the symptoms you’re seeing.  In particular, if you’re seeing “superblock time in the future” without ever having booted Windows in between, neither of those facts would likely be involved.
> 
> One thing that does occur to me is this:  If your machine is more than a few (five or so) years old, the battery (that keeps the hardware clock running when the machine is powered off) may be getting tired.  It may need to be replaced.  If you’re not comfortable with opening up the case yourself, maybe you’ve got a hardware hacker friend who could help?
> 
> NB: Please ignore the above paragraph if this is a laptop.  The battery situation with a laptop is *entirely* different.
> 
> If you have a reliable Internet connection, you should probably think about installing ntp.  It won’t do anything to fix your hardware clock, but at least it will keep your system clock synchronized to the rest of the Internet.

My experience with ntp has been: install and forget.
As for any messages at startup, these might take a while to disappear.
AIUI they can be caused by fsck when it checks the root filesystem.

At this time, the system clock's only handle on time is the RTC.
The system can correct this for drift, but only after it knows what
the drift rate is, and that obviously requires running ntp over a
sufficient time period *with no interference from other well-meaning
software (or human) intervention.* Hence the importance of making
Windows leave the clock alone.

Cheers,
David.


Reply to: