Subject: Re: A3000 system clock
To: None <amiga@NetBSD.ORG>
From: Michael L. Hitch <osymh@gemini.oscs.montana.edu>
List: amiga
Date: 12/08/1995 11:18:38
On Dec 8, 8:03am, Jake Hamby wrote:
> On Thu, 7 Dec 1995, Bruce Albrecht wrote:
>
> > When I run AmigaDOS, my system clock is set to the local time, and my
> > timezone is set to 6 hours from GMT in preferences/locale. What do I
> > need to do to get NetBSD to show the correct time and timezone
> > (CST6CDT) without having to reset the system clock? I don't mind
> > rebuilding the kernel (or more), I've already done that several times.
The NetBSD kernel expects the real-time clock to contain GMT time.
The /etc/localtime link points to the appropriate local time zone
information file (in /usr/share/zoneinfo) so that the proper time is
displayed.
> Yes, what IS the correct solution to this problem? Under FreeBSD if you
> touch a file called /etc/wall_cmos_clock, then the startup script runs a
> program called adjkerntz, which ADJusts the KERNel TimeZone. On my
> NetBSD system, there didn't seem to be anything like that, and I didn't
> want to keep resetting the clock, so I took the cheating way out and
> changed the NetBSD timezone to GMT!
There is no specific "correct" way. AmigaDOS and Unix are not
compatible in how they maintain the time. Unix time is always assumed
to be GMT and AmigaDOS time is always assumed to be local.
The only way to make the times match is to adust the time as read from
the real-time clock on one system or the other. I run with my real-time
clock set to GMT and /etc/localtime linked to
/usr/share/zoneinfo/US/Mountain. My AmigaDOS S:User-Startup runs a REXX
script that adjusts the AmigaDOS system time by 360 or 420 minutes.
[Since Daylight time only changes twice a year, I just change the
adjustment twice a year - it's easier than trying to fix the script to
figure out when the DST changes occur.]
Another alternative is to modify the NetBSD clock driver to set the
NetBSD time to the adjusted value of what the real-time clock contains.
Since that adjustment varies widely, that means doing a custom
modification of the kernel clock driver for each kernel.
Or you write an adjkerntz program (or get the FreeBSD one) and run it
on startup. [What happens if you run it from /etc/rc.local, shutdown to
single user mode, and then switch back to multi-user mode? Is the FreeBSD
adjkerntz program smart enough to handle that?]
Michael
--
Michael L. Hitch INTERNET: osymh@montana.edu
Computer Consultant
Information Technology Center
Montana State University Bozeman, MT USA