diff options
-rw-r--r-- | cpukit/rtems/src/clocktodvalidate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cpukit/rtems/src/clocktodvalidate.c b/cpukit/rtems/src/clocktodvalidate.c index ad07098b31..18354ed6e0 100644 --- a/cpukit/rtems/src/clocktodvalidate.c +++ b/cpukit/rtems/src/clocktodvalidate.c @@ -53,7 +53,8 @@ bool _TOD_Validate( (the_tod->day == 0) ) return false; - if ( (the_tod->year % 4) == 0 ) + if (((the_tod->year % 4) == 0 && (the_tod->year % 100 != 0)) || + (the_tod->year % 400 == 0)) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; |