--- zotnet/tws/dtimep.c-lexed.orig Tue Feb 9 20:30:00 1999 +++ zotnet/tws/dtimep.c-lexed Tue Jan 4 11:03:29 2000 @@ -151,6 +151,7 @@ /* Zero out the struct. */ bzero( (char *) &tw, sizeof tw); + tw.tw_year = -1; /* Set default time zone. */ #ifdef ZONEINFO @@ -175,17 +176,19 @@ switch (cp = str, *cp ? lex_string( &str, start_cond) : 0) { case -1: - if (!gotdate || tw.tw_year == 0) + if (!gotdate || tw.tw_year == -1) return (struct tws *)0; /* fall through */ case 0: - if ( tw.tw_year == 0 ) { + if ( tw.tw_year == -1 ) { /* Set default year. */ time (&tclock); tw.tw_year = localtime(&tclock)->tm_year + 1900; } + else if (tw.tw_year < 69) { + tw.tw_year += 2000; + } else if (tw.tw_year < 100) { - /* assume no 2-digit years > 1999 */ tw.tw_year += 1900; } return &tw;