From 95ffdc1db428285568c1b291a9cca9ec3c251edb Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Tue, 11 Feb 2003 22:12:41 +0000 Subject: [PATCH] Fixed time zone calculation. --- dlls/kernel/time.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dlls/kernel/time.c b/dlls/kernel/time.c index 611f5e4787d..7b1e5640e70 100644 --- a/dlls/kernel/time.c +++ b/dlls/kernel/time.c @@ -350,7 +350,6 @@ static BOOL _GetTimezoneBias( * * RETURNS * - * Returns true when the local time was calculated. * Returns TRUE when the local time was calculated. * */ @@ -385,8 +384,8 @@ BOOL WINAPI SystemTimeToTzSpecificLocalTime( if (!_GetTimezoneBias(&tzinfo, lpUniversalTime, &lBias)) return FALSE; - bias = lBias * 600000000; /* 60 seconds per minute, 100000 [100-nanoseconds-ticks] per second */ - t += bias; + bias = (LONGLONG)lBias * 600000000; /* 60 seconds per minute, 100000 [100-nanoseconds-ticks] per second */ + t -= bias; ft.dwLowDateTime = (UINT)t; ft.dwHighDateTime = (UINT)(t >> 32); @@ -435,8 +434,8 @@ BOOL WINAPI TzSpecificLocalTimeToSystemTime( if (!_GetTimezoneBias(&tzinfo, lpUniversalTime, &lBias)) return FALSE; - bias = lBias * 600000000; /* 60 seconds per minute, 100000 [100-nanoseconds-ticks] per second */ - t -= bias; + bias = (LONGLONG)lBias * 600000000; /* 60 seconds per minute, 100000 [100-nanoseconds-ticks] per second */ + t += bias; ft.dwLowDateTime = (UINT)t; ft.dwHighDateTime = (UINT)(t >> 32);