RtlTimeToTimeFields fix

Rein Klazes rklazes at xs4all.nl
Thu Oct 21 09:05:11 CDT 2004


Hi,

Here is another time calc fix.  

Changelog:
	dlls/ntdll	: time.c
	Correct the calculation of the year for the 31'st of December of
	leap years.

Rein.
-- 
Rein Klazes
rklazes at xs4all.nl
-------------- next part --------------
--- wine/dlls/ntdll/time.c	2004-10-19 08:13:34.000000000 +0200
+++ mywine/dlls/ntdll/time.c	2004-10-21 15:19:18.000000000 +0200
@@ -449,6 +449,7 @@
         TimeFields->Year += DeltaYear * 4;
         Days -= DeltaYear * DAYSPERNORMALQUADRENNIUM;
         DeltaYear = Days / DAYSPERNORMALYEAR;
+        if( DeltaYear > 3) DeltaYear = 3;  /* fix 31 Dec of every leap year */
         TimeFields->Year += DeltaYear;
         Days -= DeltaYear * DAYSPERNORMALYEAR;
 


More information about the wine-patches mailing list