f



SCO 5.0.5/5.0.6 bios clock, time zone and synching

Hi All,

Does SCO expect the BIOS clock to be set to UTC?

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.
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.

Either the timezone information in scoadmin for my timezone is wrong
and I need to set up an unlisted timezone (which I can do easily
enough) or im missing something more fundamental here.

Anyone care to wield a clue-bat?

cheers
0
atarts (5)
7/30/2003 7:04:50 AM
comp.unix.sco.misc 3925 articles. 0 followers. Post Follow

5 Replies
1656 Views

Similar Articles

[PageSpeed] 0

John Smith wrote:

> Does SCO expect the BIOS clock to be set to UTC?
> 
> 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.
> 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.
> 
> Either the timezone information in scoadmin for my timezone is wrong
> and I need to set up an unlisted timezone (which I can do easily
> enough) or im missing something more fundamental here.
> 
> Anyone care to wield a clue-bat?

Yes: you left out all numeric values.  You say the timezone was wrong
with the BIOS clock set to localtime, and it was wrong with the BIOS
clock set to UTC.  So OK, it's always wrong -- by what offset?  Show
actual examples (and don't make them up, capture real values from actual
problematic systems).

I think in 506 it actually tries to tell whether the BIOS is in UTC or
localtime.  Earlier releases probably did always expect UTC.

Regardless of the BIOS, once Unix is up and running, it keeps UTC time
internally.  Anything that asks "what time is it?", whether in the
kernel or a user program, gets its answer in UTC.  User processes have
by convention an environment variable, $TZ, that tells them what the
_user_ expects to see.  Two users logged into the same system, ssh'd
from Poland and Tonga, will have set their $TZ differently.  As long as
the kernel's UTC reference time is correct, when those users ask to see
a time, it will be correct for their local timezone.

Your statement "The timezone settings in SCO Admin are also wrong." is
especially unclear.  SCOAdmin has many tentacles; tell exactly what
you've invoked.  Is it `scoadmin system time manager`?  Then, how is it
wrong?  It pretty much just does what you tell it to do.  If you specify
a timezone in that scoadmin module, that's the timezone you should get
by default on subsequent logins.  It writes the setting into
/etc/TIMEZONE, which is processed by user login scripts; this sets the
system-wide default timezone, used by daemons and by users who don't
explicitly override it.

>Bela<
0
belal (357)
7/30/2003 8:06:25 AM
John Smith wrote:
> 
> Hi All,
> 
> Does SCO expect the BIOS clock to be set to UTC?
> 
> 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.
> 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.
> 
> Either the timezone information in scoadmin for my timezone is wrong
> and I need to set up an unlisted timezone (which I can do easily
> enough) or im missing something more fundamental here.
> 
> Anyone care to wield a clue-bat?
> 
> cheers

Some interesting background on PC BIOS RTC.

http://www.cl.cam.ac.uk/~mgk25/mswish/ut-rtc.html

Mike

-- 
Michael Brown

The Kingsway Group
0
mike5285 (231)
7/30/2003 12:29:10 PM
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/
0
spcecdt (83)
7/30/2003 9:35:37 PM
Bela Lubkin <belal@sco.com> wrote in message news:<20030730080625.GO24551@sco.com>...
> 
> Yes: you left out all numeric values.  You say the timezone was wrong
> with the BIOS clock set to localtime, and it was wrong with the BIOS
> clock set to UTC.  So OK, it's always wrong -- by what offset?  Show
> actual examples (and don't make them up, capture real values from actual
> problematic systems).

I really should have indicated in my original post that im just
looking for some pointers on do's/don'ts for for SCO and clock
settings etc.
Im not going to get drastically specific yet until ive completed my
testing here.
When I have all the specific numbers/values etc i'll post them here.
Should be later today.

cheers
0
atarts (5)
7/30/2003 11:22:07 PM
"John DuBois" <spcecdt@deeptht.armory.com> wrote in message
news:3f283a29$0$1095$8eec23a@newsreader.tycho.net...
> 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.

Okay, I set the RTC to localtime, set up the local timezone correct using
'tz' so I could put in the DST info etc.
All good. Clocks are correct and when NTP polls our time server it gets the
right time.

Happy Happy Joy Joy.

Tomorrow i'll test the DST change overs and see if they work as they should.

Thanks for everyones help on this one.


0
atarts (5)
7/31/2003 9:10:59 AM
Reply: