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

Re: hwclock: NVRAM flat battery sets date to 1904

On Sat, 16 May 2009 12:08:21 +0200
Børge Holen <holen.borge@gmail.com> wrote:

BH> Same thing that happens when one forget to compile in rtc?
BH> Done that a few times.
BH> On 16. mai. 2009, at 09.47, Rogério Brito <rbrito@ime.usp.br> wrote:
BH> > Hi, Mark.
BH> >
BH> > On May 16 2009, Mark Purcell wrote:
BH> >> +       hwclock --set --date 2009-5-16
BH> >
BH> > I have always done something like that with my system, since
BH> > openbsd's nntpd doesn't seem to be able to update the time
BH> > initially when it is too far from the current date.
BH> >
BH> > A more flexible solution (while still quick'n'dirty) would be to
BH> > put   the
BH> > date of the last shutdown in a given file and, in the hwclock
BH> > script, see if it such a file (like, say, the files in
BH> > /etc/default/) is readable and update the clock from that, while,
BH> > otherwise, falling   back
BH> > to a date like yours.

I recall from long ago (ca. 2004) when I had an iBook (G3) that was dual
(Debian and Mac OSX) that if I booted to Debian without a network
connection when the previous boot was to OSX, then the time went to
1904. My guess then was that the 2 systems had different origins for the
H/W clock, and if there was no ntpdate to fix it, then the system clock
was set from an h/w clock in a different format (I don't recall a
corresponding problem going the other way (no 2104 date).

| James Tappin           | School of Physics & Astronomy |  O__    |
| sjt@star.sr.bham.ac.uk | University of Birmingham      | --  \/` |
| Ph: 0121-414-6462. Fax: 0121-414-3722                  |         |

Reply to: