summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2000-02-12 09:28:40 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2000-02-12 09:28:40 +0000
commitc84e669959315289e91e8d5b9ca7a38ea7767fe0 (patch)
treede3b19bd81dce63e2672a27a4ffa0b8d5005b90c
parent4687c62062a807edbe9c73228403430b0dd98c9c (diff)
parse mm/dd/yy correctly; tron@netbsd.org and matthieu
-rw-r--r--gnu/usr.bin/cvs/lib/getdate.y5
1 files changed, 4 insertions, 1 deletions
diff --git a/gnu/usr.bin/cvs/lib/getdate.y b/gnu/usr.bin/cvs/lib/getdate.y
index 9a4a8fae658..b118f7d544e 100644
--- a/gnu/usr.bin/cvs/lib/getdate.y
+++ b/gnu/usr.bin/cvs/lib/getdate.y
@@ -643,8 +643,11 @@ Convert(Month, Day, Year, Hours, Minutes, Seconds, Meridian, DSTmode)
if (Year < 0)
Year = -Year;
- if (Year < 100)
+ if (Year < 100) {
Year += 1900;
+ if (Year < EPOCH)
+ Year += 100;
+ }
DaysInMonth[1] = Year % 4 == 0 && (Year % 100 != 0 || Year % 400 == 0)
? 29 : 28;
/* Checking for 2038 bogusly assumes that time_t is 32 bits. But