Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/at Add timebase (1900 years) to system time before p...



details:   https://anonhg.NetBSD.org/src/rev/0363489c3cc1
branches:  trunk
changeset: 480172:0363489c3cc1
user:      tron <tron%NetBSD.org@localhost>
date:      Thu Jan 06 00:44:09 2000 +0000

description:
Add timebase (1900 years) to system time before passing it to date time
parser. Fixes PR y2k/9122 by Lars-Johan Liman.

diffstat:

 usr.bin/at/parsetime.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 854b5cb417ca -r 0363489c3cc1 usr.bin/at/parsetime.c
--- a/usr.bin/at/parsetime.c    Thu Jan 06 00:34:38 2000 +0000
+++ b/usr.bin/at/parsetime.c    Thu Jan 06 00:44:09 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parsetime.c,v 1.8 2000/01/06 00:34:38 tron Exp $       */
+/*     $NetBSD: parsetime.c,v 1.9 2000/01/06 00:44:09 tron Exp $       */
 
 /* 
  * parsetime.c - parse time for at(1)
@@ -141,7 +141,7 @@
 #if 0
 static char rcsid[] = "$OpenBSD: parsetime.c,v 1.4 1997/03/01 23:40:10 millert Exp $";
 #else
-__RCSID("$NetBSD: parsetime.c,v 1.8 2000/01/06 00:34:38 tron Exp $");
+__RCSID("$NetBSD: parsetime.c,v 1.9 2000/01/06 00:44:09 tron Exp $");
 #endif
 #endif
 
@@ -526,7 +526,7 @@
 
                tm->tm_wday = wday;
 
-               assign_date(tm, mday, tm->tm_mon, tm->tm_year);
+               assign_date(tm, mday, tm->tm_mon, tm->tm_year + TM_YEAR_BASE);
                break;
 
        case NUMBER:



Home | Main Index | Thread Index | Old Index