From 44a27a55dbdbdab9203f3f3bbcf81322492690d0 Mon Sep 17 00:00:00 2001 From: Dale Rahn Date: Sat, 2 Jun 2001 16:49:19 +0000 Subject: 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. --- sys/arch/powerpc/powerpc/clock.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'sys') 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 -- cgit v1.2.3