[ros-diffs] [dchapyshev] 41884: - Fix one "kernel32_winetest time" test. All time tests passed now

dchapyshev at svn.reactos.org dchapyshev at svn.reactos.org
Sat Jul 11 15:35:39 CEST 2009


Author: dchapyshev
Date: Sat Jul 11 17:35:38 2009
New Revision: 41884

URL: http://svn.reactos.org/svn/reactos?rev=41884&view=rev
Log:
- Fix one "kernel32_winetest time" test. All time tests passed now

Modified:
    trunk/reactos/dll/win32/kernel32/misc/time.c

Modified: trunk/reactos/dll/win32/kernel32/misc/time.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/time.c?rev=41884&r1=41883&r2=41884&view=diff
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/time.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/misc/time.c [iso-8859-1] Sat Jul 11 17:35:38 2009
@@ -204,6 +204,27 @@
 }
 
 /***********************************************************************
+ *  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
  *
  *  Calculates the local time bias for a given time zone.
@@ -534,7 +555,7 @@
         return TIME_ZONE_ID_INVALID;
     }
 
-    return(SharedUserData->TimeZoneId);
+    return TIME_ZoneID(lpTimeZoneInformation);
 }
 
 



More information about the Ros-diffs mailing list