Subject: Re: HEADS UP: rtc_offset/RTC_OFFSET implemented.
To: None <bsd@blkhole.resun.com>
From: Ignatios Souvatzis <is@beverly.rhein.de>
List: port-amiga
Date: 07/07/1997 14:01:33
Don Philipps asked:

> On Mon, 7 Jul 1997, Ignatios Souvatzis wrote:
> 
> > I just implemented 
> > 
> > options RTC_OFFSET=mmm
> 
> By any chance, is this a "Real Time Clock?"
...
> When I looked in the distribution source files from NetBSD.ORG, I
> didn't find any reference to RTC anywhere within the config files.

* The A2000 and A3000 real-time (that is, battery backed) clock 
are supported now since at least 2 formal releases of the OS. The
A2000/A3000 rtc is always used by the kernel (if appropriate).
The code is located within sys/arch/amiga/dev/clock.c.


* I added half (reading only) support of the DraCo RTC yestereve, and
decided to implement the RTC_OFFSET support while looking at that code.

This is only a problem for people who run the experimental
NetBSD-current, and who use their own kernel config files, as in the old
kernel config files there was an (unused by the kernel) RTC_OFFSET=300
option, which would be activated by the new code.

> > current-users might want to read 
> > man 4 options 
> > for the details.
> 
> Where are the 'current' sources and man pages located?  I looked for
> them at NetBSD.ORG, but didn't see anything that looked appropriate.

Thats the experimental source tree, which can be used by people wanting
to test it. You can get it through daily SUP transfers or through ftp of
weekly tar archives. Details are on http://www.netbsd.org/ (select "how
to get"; for what -current is, select "current").

The RTC_OFFSET option (or the rtc_offset kernel variable) are used on
some ports which might run the battery backed ("real-time") clock at an
offset from GMT, so that the kernel can read the right time from it, and
set it to the right time.

This is no full solution to that problem, as the offset would change
twice a year if your timezone is using daylight savings time. The right
solution is to operate the battery backed clock at GMT and make the OS
interpret the timezone when it is printed. The time itself does not
change twice a year, just how we interpret it :-). However, for some Operating
Systems (which you might want to use besides NetBSD on your computer)
this is not possible. 

AmigaOS is one of them. However, there are two (free) add-on solutions,
(unixclock and a rexx script but I dont remember the name) which do the
job. 

But if you dont use any of them, binpatch'ing your kernel twice a year
might be just what you need.

> Thanks for any information that you provide.

It has been a pleasure.

	-is