lkml.org 
[lkml]   [1997]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Two bugs in kernel time code
Rogier Wolff wrote:
>
> Philip Gladstone wrote:
> > My revolting approach to this is to have a sysconfig variable that gives
> > the offset of the CMOS clock from UTC. This defaults to 'unknown'. If it
> > is known, then the CMOS clock is updated with the correct hour (etc)
> > values.
>
> How about just calculating the difference between the unix clock and
> the CMOS clock. If that's within 10 minutes of a whole number of hours,
> then you can safely round it to "a whole number of hours".

My goal was to eliminate the 'clock -w' that you have to do
occasionally.

There are two steps to this:

1) Fix settimeofday to set the CMOS clock. I do this if I know
the cmos clock offset (in my systems, we run CMOS=GMT). Set all
the fields in the clock.

[I use a minute offset field, with -1 being the 'unknown' value]

2) Do something mysterious with the clock warping code for
backwards compatibility. [not done]

I could provide these patches if anybody is interested.

Philip


--
Philip Gladstone +1 617 487 7700
Raptor Systems, Waltham, MA http://www.raptor.com/

\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.045 / U:2.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site