From 03d24cbca47fbf565741c7ea77eaf66c49c04582 Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Thu, 4 Nov 1993 01:56:31 +0000 Subject: [PATCH] DST offset calculation removed, it is wrong in any case. --- sys/amd64/amd64/tsc.c | 12 +----------- sys/amd64/isa/clock.c | 12 +----------- sys/i386/i386/tsc.c | 12 +----------- sys/i386/isa/clock.c | 12 +----------- sys/isa/atrtc.c | 12 +----------- 5 files changed, 5 insertions(+), 55 deletions(-) diff --git a/sys/amd64/amd64/tsc.c b/sys/amd64/amd64/tsc.c index 53497c84873..133f2d1e8e6 100644 --- a/sys/amd64/amd64/tsc.c +++ b/sys/amd64/amd64/tsc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id$ + * $Id: clock.c,v 1.2 1993/10/16 13:45:44 rgrimes Exp $ */ /* @@ -50,9 +50,6 @@ #include "i386/isa/rtc.h" #include "i386/isa/timerreg.h" -#define DAYST 119 -#define DAYEN 303 - /* X-tals being what they are, it's nice to be able to fudge this one... */ /* Note, the name changed here from XTALSPEED to TIMER_FREQ rgrimes 4/26/93 */ #ifndef TIMER_FREQ @@ -186,13 +183,6 @@ inittodr(base) sec += bcd(rtcin(RTC_MIN)) * 60; /* minutes */ sec += bcd(rtcin(RTC_SEC)); /* seconds */ - /* XXX off by one? Need to calculate DST on SUNDAY */ - /* Perhaps we should have the RTC hold GMT time to save */ - /* us the bother of converting. */ - yd = yd / (24*60*60); - if ((yd >= DAYST) && ( yd <= DAYEN)) { - sec -= 60*60; - } sec += tz.tz_minuteswest * 60; time.tv_sec = sec; diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c index 53497c84873..133f2d1e8e6 100644 --- a/sys/amd64/isa/clock.c +++ b/sys/amd64/isa/clock.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id$ + * $Id: clock.c,v 1.2 1993/10/16 13:45:44 rgrimes Exp $ */ /* @@ -50,9 +50,6 @@ #include "i386/isa/rtc.h" #include "i386/isa/timerreg.h" -#define DAYST 119 -#define DAYEN 303 - /* X-tals being what they are, it's nice to be able to fudge this one... */ /* Note, the name changed here from XTALSPEED to TIMER_FREQ rgrimes 4/26/93 */ #ifndef TIMER_FREQ @@ -186,13 +183,6 @@ inittodr(base) sec += bcd(rtcin(RTC_MIN)) * 60; /* minutes */ sec += bcd(rtcin(RTC_SEC)); /* seconds */ - /* XXX off by one? Need to calculate DST on SUNDAY */ - /* Perhaps we should have the RTC hold GMT time to save */ - /* us the bother of converting. */ - yd = yd / (24*60*60); - if ((yd >= DAYST) && ( yd <= DAYEN)) { - sec -= 60*60; - } sec += tz.tz_minuteswest * 60; time.tv_sec = sec; diff --git a/sys/i386/i386/tsc.c b/sys/i386/i386/tsc.c index 53497c84873..133f2d1e8e6 100644 --- a/sys/i386/i386/tsc.c +++ b/sys/i386/i386/tsc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id$ + * $Id: clock.c,v 1.2 1993/10/16 13:45:44 rgrimes Exp $ */ /* @@ -50,9 +50,6 @@ #include "i386/isa/rtc.h" #include "i386/isa/timerreg.h" -#define DAYST 119 -#define DAYEN 303 - /* X-tals being what they are, it's nice to be able to fudge this one... */ /* Note, the name changed here from XTALSPEED to TIMER_FREQ rgrimes 4/26/93 */ #ifndef TIMER_FREQ @@ -186,13 +183,6 @@ inittodr(base) sec += bcd(rtcin(RTC_MIN)) * 60; /* minutes */ sec += bcd(rtcin(RTC_SEC)); /* seconds */ - /* XXX off by one? Need to calculate DST on SUNDAY */ - /* Perhaps we should have the RTC hold GMT time to save */ - /* us the bother of converting. */ - yd = yd / (24*60*60); - if ((yd >= DAYST) && ( yd <= DAYEN)) { - sec -= 60*60; - } sec += tz.tz_minuteswest * 60; time.tv_sec = sec; diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c index 53497c84873..133f2d1e8e6 100644 --- a/sys/i386/isa/clock.c +++ b/sys/i386/isa/clock.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id$ + * $Id: clock.c,v 1.2 1993/10/16 13:45:44 rgrimes Exp $ */ /* @@ -50,9 +50,6 @@ #include "i386/isa/rtc.h" #include "i386/isa/timerreg.h" -#define DAYST 119 -#define DAYEN 303 - /* X-tals being what they are, it's nice to be able to fudge this one... */ /* Note, the name changed here from XTALSPEED to TIMER_FREQ rgrimes 4/26/93 */ #ifndef TIMER_FREQ @@ -186,13 +183,6 @@ inittodr(base) sec += bcd(rtcin(RTC_MIN)) * 60; /* minutes */ sec += bcd(rtcin(RTC_SEC)); /* seconds */ - /* XXX off by one? Need to calculate DST on SUNDAY */ - /* Perhaps we should have the RTC hold GMT time to save */ - /* us the bother of converting. */ - yd = yd / (24*60*60); - if ((yd >= DAYST) && ( yd <= DAYEN)) { - sec -= 60*60; - } sec += tz.tz_minuteswest * 60; time.tv_sec = sec; diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c index 53497c84873..133f2d1e8e6 100644 --- a/sys/isa/atrtc.c +++ b/sys/isa/atrtc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id$ + * $Id: clock.c,v 1.2 1993/10/16 13:45:44 rgrimes Exp $ */ /* @@ -50,9 +50,6 @@ #include "i386/isa/rtc.h" #include "i386/isa/timerreg.h" -#define DAYST 119 -#define DAYEN 303 - /* X-tals being what they are, it's nice to be able to fudge this one... */ /* Note, the name changed here from XTALSPEED to TIMER_FREQ rgrimes 4/26/93 */ #ifndef TIMER_FREQ @@ -186,13 +183,6 @@ inittodr(base) sec += bcd(rtcin(RTC_MIN)) * 60; /* minutes */ sec += bcd(rtcin(RTC_SEC)); /* seconds */ - /* XXX off by one? Need to calculate DST on SUNDAY */ - /* Perhaps we should have the RTC hold GMT time to save */ - /* us the bother of converting. */ - yd = yd / (24*60*60); - if ((yd >= DAYST) && ( yd <= DAYEN)) { - sec -= 60*60; - } sec += tz.tz_minuteswest * 60; time.tv_sec = sec;