fix for RtlTimeFieldsToTime

Rein Klazes rklazes at xs4all.nl
Fri Apr 2 07:52:13 CST 2004


Hi, 

RtlTimeFieldsToTime is 1 day off with current time.

Changelog:
	dlls/ntdll/	: time.c
	Fix incorrect calculation of leap year in
	RtlTimeFieldsToTime().

Rein.	
-- 
Rein Klazes
rklazes at xs4all.nl
-------------- next part --------------
--- wine/dlls/ntdll/time.c	2004-03-11 01:46:09.000000000 +0100
+++ mywine/dlls/ntdll/time.c	2004-04-02 14:54:23.000000000 +0200
@@ -465,7 +465,7 @@
         rcTime += CurYear * DAYSPERNORMALYEAR;
 
 	for (CurMonth = 1; CurMonth < TimeFields.Month; CurMonth++)
-	{ rcTime += MonthLengths[IsLeapYear(CurYear)][CurMonth - 1];
+	{ rcTime += MonthLengths[IsLeapYear(TimeFields.Year)][CurMonth - 1];
 	}
 	rcTime += TimeFields.Day - 1;
 	rcTime *= SECSPERDAY;


More information about the wine-patches mailing list