projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e34035c
)
(Convert): Don't reject all dates in 2038.
author
Jim Meyering
<jim@meyering.net>
Tue, 10 Dec 1996 04:34:18 +0000
(
04:34
+0000)
committer
Jim Meyering
<jim@meyering.net>
Tue, 10 Dec 1996 04:34:18 +0000
(
04:34
+0000)
Some fit in 31 bits.
lib/getdate.y
patch
|
blob
|
history
diff --git
a/lib/getdate.y
b/lib/getdate.y
index 8e35c9203d6084f4e204c0fc41d3226efb8e54e1..f7040182aca8b30739afe3a34795bebc38282fd7 100644
(file)
--- a/
lib/getdate.y
+++ b/
lib/getdate.y
@@
-690,7
+690,7
@@
Convert (Month, Day, Year, Hours, Minutes, Seconds, Meridian, DSTmode)
Year += 1900;
DaysInMonth[1] = Year % 4 == 0 && (Year % 100 != 0 || Year % 400 == 0)
? 29 : 28;
- if (Year < EPOCH || Year >
=
DOOMSDAY
+ if (Year < EPOCH || Year > DOOMSDAY
|| Month < 1 || Month > 12
/* Lint fluff: "conversion from long may lose accuracy" */
|| Day < 1 || Day > DaysInMonth[(int)--Month])