diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2000-09-06 18:15:50 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2000-09-06 18:15:50 +0000 |
commit | c18d9ca296e1a55ad131c61f1b2bbf7b9f68219f (patch) | |
tree | dac571ef90a379c583198469b606ebf7a8a77fc2 /sys/arch | |
parent | f2d38b609fbb1d321a67acb449f79990ef0501b5 (diff) |
take offset from hardware clock specified with 'option TIMEZONE=' and
'option DST=' into account when initializing the clock. ok drahn@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/powerpc/powerpc/clock.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/arch/powerpc/powerpc/clock.c b/sys/arch/powerpc/powerpc/clock.c index 9db0451c3e3..afbf442327b 100644 --- a/sys/arch/powerpc/powerpc/clock.c +++ b/sys/arch/powerpc/powerpc/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.8 2000/04/11 02:44:30 pjanzen Exp $ */ +/* $OpenBSD: clock.c,v 1.9 2000/09/06 18:15:49 matthieu Exp $ */ /* $NetBSD: clock.c,v 1.1 1996/09/30 16:34:40 ws Exp $ */ /* @@ -117,7 +117,13 @@ inittodr(base) if (!badbase) resettodr(); } else { - int deltat = time.tv_sec - base; + int deltat; + + time.tv_sec += tz.tz_minuteswest * 60; + if (tz.tz_dsttime) + time.tv_sec -= 3600; + + deltat = time.tv_sec - base; if (deltat < 0) deltat = -deltat; |