5ab9c0
Index: shadow-4.5/libmisc/getdate.y
5ab9c0
===================================================================
5ab9c0
--- shadow-4.5.orig/libmisc/getdate.y
5ab9c0
+++ shadow-4.5/libmisc/getdate.y
5ab9c0
@@ -152,6 +152,7 @@ static int	yyHaveDay;
5ab9c0
 static int	yyHaveRel;
5ab9c0
 static int	yyHaveTime;
5ab9c0
 static int	yyHaveZone;
5ab9c0
+static int      yyHaveYear;
5ab9c0
 static int	yyTimezone;
5ab9c0
 static int	yyDay;
5ab9c0
 static int	yyHour;
5ab9c0
@@ -293,18 +294,21 @@ date	: tUNUMBER '/' tUNUMBER {
5ab9c0
 	      yyDay = $3;
5ab9c0
 	      yyYear = $5;
5ab9c0
 	    }
5ab9c0
+	    yyHaveYear++;
5ab9c0
 	}
5ab9c0
 	| tUNUMBER tSNUMBER tSNUMBER {
5ab9c0
 	    /* ISO 8601 format.  yyyy-mm-dd.  */
5ab9c0
 	    yyYear = $1;
5ab9c0
 	    yyMonth = -$2;
5ab9c0
 	    yyDay = -$3;
5ab9c0
+	    yyHaveYear++;
5ab9c0
 	}
5ab9c0
 	| tUNUMBER tMONTH tSNUMBER {
5ab9c0
 	    /* e.g. 17-JUN-1992.  */
5ab9c0
 	    yyDay = $1;
5ab9c0
 	    yyMonth = $2;
5ab9c0
 	    yyYear = -$3;
5ab9c0
+	    yyHaveYear++;
5ab9c0
 	}
5ab9c0
 	| tMONTH tUNUMBER {
5ab9c0
 	    yyMonth = $1;
5ab9c0
@@ -314,6 +318,7 @@ date	: tUNUMBER '/' tUNUMBER {
5ab9c0
 	    yyMonth = $1;
5ab9c0
 	    yyDay = $2;
5ab9c0
 	    yyYear = $4;
5ab9c0
+	    yyHaveYear++;
5ab9c0
 	}
5ab9c0
 	| tUNUMBER tMONTH {
5ab9c0
 	    yyMonth = $2;
5ab9c0
@@ -323,6 +328,7 @@ date	: tUNUMBER '/' tUNUMBER {
5ab9c0
 	    yyMonth = $2;
5ab9c0
 	    yyDay = $1;
5ab9c0
 	    yyYear = $3;
5ab9c0
+	    yyHaveYear++;
5ab9c0
 	}
5ab9c0
 	;
5ab9c0
 
5ab9c0
@@ -395,7 +401,8 @@ relunit	: tUNUMBER tYEAR_UNIT {
5ab9c0
 
5ab9c0
 number	: tUNUMBER
5ab9c0
           {
5ab9c0
-	    if ((yyHaveTime != 0) && (yyHaveDate != 0) && (yyHaveRel == 0))
5ab9c0
+	    if ((yyHaveTime != 0 || $1 >= 100) && !yyHaveYear
5ab9c0
+		&& (yyHaveDate != 0) && (yyHaveRel == 0))
5ab9c0
 	      yyYear = $1;
5ab9c0
 	    else
5ab9c0
 	      {
5ab9c0
@@ -802,7 +809,7 @@ yylex (void)
5ab9c0
 	  return LookupWord (buff);
5ab9c0
 	}
5ab9c0
       if (c != '(')
5ab9c0
-	return *yyInput++;
5ab9c0
+	return (unsigned char)*yyInput++;
5ab9c0
       Count = 0;
5ab9c0
       do
5ab9c0
 	{