[Bug 2449] New: bug in dlls/kernel/time.c. incorrect time conversion in TzSpecificLocalTimeToSystemTime
Wine Bugs
wine-bugs at winehq.org
Fri Aug 27 01:48:13 CDT 2004
http://bugs.winehq.org/show_bug.cgi?id=2449
Summary: bug in dlls/kernel/time.c. incorrect time conversion in
TzSpecificLocalTimeToSystemTime
Product: Wine
Version: 20040813
Platform: All
OS/Version: All
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: wine-kernel
AssignedTo: wine-bugs at winehq.org
ReportedBy: oradba at inbox.ru
a quote from your source:
if (!SystemTimeToFileTime(lpLocalTime, &ft))
return FALSE;
t = ft.dwHighDateTime;
t <<= 32;
t += (UINT)ft.dwLowDateTime;
if (!_GetTimezoneBias(&tzinfo, &lpLocalTime, &lBias))
return FALSE;
you pass LocalTime to _GetTimeZoneBias, instead of systemtime.
Yes, we can't figure if it is daylight or standard time in one hour between
daylight->standard change 02:00-03:00, its ok. In original version
we had such error in Bias+DaylightBias interval (up to 24 hours, 4 hours for
moscow - for example),
so I reduced error period to DaylightBias (1 hour). Now it doesn't depend on time
zone.
my version:
LONGLONG t2;
SYSTEMTIME st;
t2 = t + (LONGLONG)tzinfo.Bias * 600000000;
if (!FileTimeToSystemTime((FILETIME*)&t2, &st))
return FALSE;
if (!_GetTimezoneBias(&tzinfo, &st, &lBias))
return FALSE;
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the wine-bugs
mailing list