Correct the calculation of the year for the 31'st of December of leap

years.
This commit is contained in:
Rein Klazes 2004-10-21 19:57:00 +00:00 committed by Alexandre Julliard
parent dc78e9a595
commit 62ec238792
1 changed files with 1 additions and 0 deletions

View File

@ -449,6 +449,7 @@ VOID WINAPI RtlTimeToTimeFields(
TimeFields->Year += DeltaYear * 4; TimeFields->Year += DeltaYear * 4;
Days -= DeltaYear * DAYSPERNORMALQUADRENNIUM; Days -= DeltaYear * DAYSPERNORMALQUADRENNIUM;
DeltaYear = Days / DAYSPERNORMALYEAR; DeltaYear = Days / DAYSPERNORMALYEAR;
if( DeltaYear > 3) DeltaYear = 3; /* fix 31 Dec of every leap year */
TimeFields->Year += DeltaYear; TimeFields->Year += DeltaYear;
Days -= DeltaYear * DAYSPERNORMALYEAR; Days -= DeltaYear * DAYSPERNORMALYEAR;