Thanks to Saraceno Giuseppe here are some more (and hopefully the last) bug
fixes for the time conversion functions SystemTimeToTzSpecificLocalTime() and
TzSpecificLocalTimeToSystemTime().
--
Martin Fuchs
martin-fuchs@gmx.net
Index: dlls/kernel/time.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel/time.c,v
retrieving revision 1.32
diff -u -r1.32 time.c
--- dlls/kernel/time.c 18 Mar 2003 18:35:49 -0000 1.32
+++ dlls/kernel/time.c 15 Apr 2003 20:43:51 -0000
@@ -296,7 +296,7 @@
LONG* pBias) /* [out] The calulated bias in minutes */
{
int ret;
- BOOL beforedaylightsaving, afterdaylightsaving;
+ BOOL beforeStandardDate, afterDaylightDate;
BOOL daylightsaving = FALSE;
LONG bias = lpTimeZoneInformation->Bias;
@@ -313,19 +313,19 @@
}
/* check for daylight saving */
- ret = _DayLightCompareDate(lpSystemTime, &lpTimeZoneInformation->StandardDate);
- if (ret == -2)
+ ret = _DayLightCompareDate(lpSystemTime, &lpTimeZoneInformation->StandardDate);
+ if (ret == -2)
return FALSE;
- beforedaylightsaving = ret < 0;
+ beforeStandardDate = ret < 0;
- _DayLightCompareDate(lpSystemTime, &lpTimeZoneInformation->DaylightDate);
- if (ret == -2)
+ ret = _DayLightCompareDate(lpSystemTime, &lpTimeZoneInformation->DaylightDate);
+ if (ret == -2)
return FALSE;
- afterdaylightsaving = ret >= 0;
+ afterDaylightDate = ret >= 0;
- if (!beforedaylightsaving && !afterdaylightsaving)
+ if (beforeStandardDate && afterDaylightDate)
daylightsaving = TRUE;
}
@@ -426,7 +426,7 @@
t <<= 32;
t += (UINT)ft.dwLowDateTime;
- if (!_GetTimezoneBias(&tzinfo, lpUniversalTime, &lBias))
+ if (!_GetTimezoneBias(&tzinfo, lpLocalTime, &lBias))
return FALSE;
bias = (LONGLONG)lBias * 600000000; /* 60 seconds per minute, 100000 [100-nanoseconds-ticks] per second */