From fad802aace7effbb8ed1830cac1e34ca81ce14ae Mon Sep 17 00:00:00 2001 From: Dmitry Chapyshev Date: Sat, 11 Jul 2009 13:35:38 +0000 Subject: [PATCH] - Fix one "kernel32_winetest time" test. All time tests passed now svn path=/trunk/; revision=41884 --- reactos/dll/win32/kernel32/misc/time.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/reactos/dll/win32/kernel32/misc/time.c b/reactos/dll/win32/kernel32/misc/time.c index 99eecb84067..2eb8eb4d702 100644 --- a/reactos/dll/win32/kernel32/misc/time.c +++ b/reactos/dll/win32/kernel32/misc/time.c @@ -203,6 +203,27 @@ TIME_CompTimeZoneID( const TIME_ZONE_INFORMATION *pTZinfo, FILETIME *lpFileTime, return retval; } +/*********************************************************************** + * TIME_TimeZoneID + * + * Calculates whether daylight savings is on now. + * + * PARAMS + * pTzi [in] Timezone info. + * + * RETURNS + * TIME_ZONE_ID_INVALID An error occurred + * TIME_ZONE_ID_UNKNOWN There are no transition time known + * TIME_ZONE_ID_STANDARD Current time is standard time + * TIME_ZONE_ID_DAYLIGHT Current time is daylight savings time + */ +static DWORD TIME_ZoneID( const TIME_ZONE_INFORMATION *pTzi ) +{ + FILETIME ftTime; + GetSystemTimeAsFileTime( &ftTime); + return TIME_CompTimeZoneID( pTzi, &ftTime, FALSE); +} + /*********************************************************************** * TIME_GetTimezoneBias * @@ -534,7 +555,7 @@ GetTimeZoneInformation(LPTIME_ZONE_INFORMATION lpTimeZoneInformation) return TIME_ZONE_ID_INVALID; } - return(SharedUserData->TimeZoneId); + return TIME_ZoneID(lpTimeZoneInformation); }