Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/hp300/stand/common Fix yet another y2k+1 bug.



details:   https://anonhg.NetBSD.org/src/rev/c84fe4182469
branches:  trunk
changeset: 565406:c84fe4182469
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Wed Apr 07 13:29:26 2004 +0000

description:
Fix yet another y2k+1 bug.

diffstat:

 sys/arch/hp300/stand/common/clock.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r 64c1192f5cd1 -r c84fe4182469 sys/arch/hp300/stand/common/clock.c
--- a/sys/arch/hp300/stand/common/clock.c       Wed Apr 07 13:13:59 2004 +0000
+++ b/sys/arch/hp300/stand/common/clock.c       Wed Apr 07 13:29:26 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clock.c,v 1.4 2003/11/14 16:52:40 tsutsui Exp $        */
+/*     $NetBSD: clock.c,v 1.5 2004/04/07 13:29:26 tsutsui Exp $        */
 
 /*
  * Copyright (c) 1982, 1990, 1993
@@ -148,11 +148,12 @@
        day   = bbc_to_decimal(8, 7);
        month = bbc_to_decimal(10, 9);
        year  = bbc_to_decimal(12, 11) + 1900;
+       if (year < STARTOFTIME)
+               year += 100;
 
        range_test(hour, 0, 23);
        range_test(day, 1, 31);
        range_test(month, 1, 12);
-       range_test(year, STARTOFTIME, 2000);
 
        tmp = 0;
 



Home | Main Index | Thread Index | Old Index