Changeset 8ed1a54c in rtems


Ignore:
Timestamp:
Jun 4, 2009, 3:54:40 PM (10 years ago)
Author:
Nickolay Semyonov-Kolchin <nbkolchin@…>
Branches:
4.11, master
Children:
54da1243
Parents:
262e250
git-author:
Nickolay Semyonov-Kolchin <nbkolchin@…> (06/04/09 15:54:40)
git-committer:
Gedare Bloom <gedare@…> (12/05/13 16:57:06)
Message:

Fix leap year calculation

Reference: http://en.wikipedia.org/wiki/Leap_year
Bug: https://www.rtems.org/bugzilla/show_bug.cgi?id=1422

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/src/clocktodvalidate.c

    r262e250 r8ed1a54c  
    5454     return false;
    5555
    56   if ( (the_tod->year % 4) == 0 )
     56  if (((the_tod->year % 4) == 0 && (the_tod->year % 100 != 0)) ||
     57     (the_tod->year % 400 == 0))
    5758    days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
    5859  else
Note: See TracChangeset for help on using the changeset viewer.