Re: SCO 5.0.5/5.0.6 bios clock, time zone and synching

From: John DuBois (spcecdt_at_deeptht.armory.com)
Date: 07/30/03


Date: 30 Jul 2003 21:35:37 GMT

In article <8512fc7a.0307292304.70bfe523@posting.google.com>,
John Smith <atarts@hotmail.com> wrote:
>Does SCO expect the BIOS clock to be set to UTC?

No. All versions of SCO OpenServer and the OSes that led up to it (including
all versions of SCO XENIX) expect the RTC (what you're calling the BIOS clock)
to be set to the time in the local timezone. This practice has some
unfortunate aspects to it; it was selected despite that because we expect
administrators to set the RTC to the current local time using the BIOS, since
that's what they do for other OSes.

>Ive got a few SCO boxen spread across a couple of time zones and at
>the moment, the bios clocks in the servers are set to localtime not
>UTC.
>The timezone settings in SCO Admin are also wrong.
>
>I was under the impression *nix always expects the BIOS clock to be
>set to UTC and then the timezone settings in SCO tell the OS what the
>local time is.

No. The OS itself keeps time in UTC. The timezone information is used to
convert from that to local time, but it is *also* used in an inverse sense to
convert the time as read from the RTC into UTC so that the OS clock can be
synchronized to it.

>This does not seem to be the case for me.
>On a testing box, Ive set the BIOS clock to UTC, set the correct
>timezone in scoadmin but the date command in a root shell still gives
>the wrong time.

This fails because the OS is assuming that the RTC is set to local time, so
when it applies the timezone information to it to get UTC it produces an
incorrect result.

As of 5.0.7, the information that is actually used to convert between RTC time
and UTC is cached in the file /etc/rtc.data. It's stored there when the RTC is
set and is pushed down into the kernel at boot time to allow conversion from
RTC time to UTC. This avoids a problem with machines that are down during a
DST transition, and problems that occur when the timezone is changed. You
shouldn't go modifying that file since it's maintained automatically by setclk.

It might be useful to provide a means for a system administrator to specify the
RTC/UTC delta instead of locking this to TZ, mainly to allow the RTC to be set
to UTC for those systems that are administrated in such a way that there is no
danger of an admin setting the RTC to local time through the BIOS.

        John

-- 
John DuBois  spcecdt@armory.com  KC6QKZ/AE  http://www.armory.com/~spcecdt/


Relevant Pages


Quantcast