1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-08-04 15:49:42 +02:00

(Convert): Don't reject all dates in 2038.

Some fit in 31 bits.
This commit is contained in:
Jim Meyering
1996-12-10 04:34:18 +00:00
parent d5ce3b1c3c
commit 8f477a9072
+1 -1
View File
@@ -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])