summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2001-06-02 16:49:19 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2001-06-02 16:49:19 +0000
commit44a27a55dbdbdab9203f3f3bbcf81322492690d0 (patch)
treedb2c75e2790aac9cbdb1d5637a9da079acdf458b /sys/arch
parentd306ccbf67081606c0b4572cb2cfc73ca7227bff (diff)
Support writing to the hardware clock for powerpc apple systems.
Note this writes the clock in UTC time, not localtime in the default kernel. MacOS/OS X expect the hardware clock to be in local time. If the system is to be dual booted, the time offset can be adjusted using "config -e" and setting the timezone of the kernel.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/powerpc/powerpc/clock.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/arch/powerpc/powerpc/clock.c b/sys/arch/powerpc/powerpc/clock.c
index 4e6bdef676c..26b2256efff 100644
--- a/sys/arch/powerpc/powerpc/clock.c
+++ b/sys/arch/powerpc/powerpc/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.10 2001/05/29 01:20:44 drahn Exp $ */
+/* $OpenBSD: clock.c,v 1.11 2001/06/02 16:49:18 drahn Exp $ */
/* $NetBSD: clock.c,v 1.1 1996/09/30 16:34:40 ws Exp $ */
/*
@@ -185,17 +185,14 @@ chiptotime(sec, min, hour, day, mon, year)
void
resettodr()
{
- struct timeval curtime;
- #if 0
+ struct timeval curtime = time;
if (time_write != NULL) {
- curtime = time;
curtime.tv_sec -= tz.tz_minuteswest * 60;
if (tz.tz_dsttime) {
curtime.tv_sec += 3600;
}
- (*time_write)(time.tv_sec);
+ (*time_write)(curtime.tv_sec);
}
- #endif
}
void