Author: akhaldi Date: Sat Oct 26 21:29:03 2013 New Revision: 60759
URL: http://svn.reactos.org/svn/reactos?rev=60759&view=rev Log: [WBEMPROX] * Sync with Wine 1.7.2. Hello LocalDateTime.
Modified: trunk/reactos/dll/win32/wbemprox/builtin.c trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/wbemprox/builtin.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wbemprox/builtin.... ============================================================================== --- trunk/reactos/dll/win32/wbemprox/builtin.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wbemprox/builtin.c [iso-8859-1] Sat Oct 26 21:29:03 2013 @@ -166,6 +166,8 @@ {'I','n','t','e','g','e','r','V','a','l','u','e',0}; static const WCHAR prop_lastbootuptimeW[] = {'L','a','s','t','B','o','o','t','U','p','T','i','m','e',0}; +static const WCHAR prop_localdatetimeW[] = + {'L','o','c','a','l','D','a','t','e','T','i','m','e',0}; static const WCHAR prop_localeW[] = {'L','o','c','a','l','e',0}; static const WCHAR prop_macaddressW[] = @@ -345,6 +347,7 @@ { prop_countrycodeW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_csdversionW, CIM_STRING }, { prop_lastbootuptimeW, CIM_DATETIME|COL_FLAG_DYNAMIC }, + { prop_localdatetimeW, CIM_DATETIME|COL_FLAG_DYNAMIC }, { prop_localeW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_osarchitectureW, CIM_STRING }, { prop_oslanguageW, CIM_UINT32, VT_I4 }, @@ -597,6 +600,7 @@ const WCHAR *countrycode; const WCHAR *csdversion; const WCHAR *lastbootuptime; + const WCHAR *localdatetime; const WCHAR *locale; const WCHAR *osarchitecture; UINT32 oslanguage; @@ -1787,6 +1791,31 @@ sprintfW( ret, fmtW, tf.Year, tf.Month, tf.Day, tf.Hour, tf.Minute, tf.Second, tf.Milliseconds * 1000 ); return ret; } +static WCHAR *get_localdatetime(void) +{ + static const WCHAR fmtW[] = + {'%','0','4','u','%','0','2','u','%','0','2','u','%','0','2','u','%','0','2','u','%','0','2','u', + '.','%','0','6','u','%','+','0','3','d',0}; + TIME_ZONE_INFORMATION tzi; + SYSTEMTIME st; + WCHAR *ret; + DWORD Status; + LONG Bias; + + Status = GetTimeZoneInformation(&tzi); + + if(Status == TIME_ZONE_ID_INVALID) return NULL; + Bias = tzi.Bias; + if(Status == TIME_ZONE_ID_DAYLIGHT) + Bias+= tzi.DaylightBias; + else + Bias+= tzi.StandardBias; + if (!(ret = heap_alloc( 26 * sizeof(WCHAR) ))) return NULL; + + GetLocalTime(&st); + sprintfW( ret, fmtW, st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond, st.wMilliseconds * 1000, -Bias); + return ret; +} static WCHAR *get_systemdirectory(void) { void *redir; @@ -1832,6 +1861,7 @@ rec->countrycode = get_countrycode(); rec->csdversion = os_csdversionW; rec->lastbootuptime = get_lastbootuptime(); + rec->localdatetime = get_localdatetime(); rec->locale = get_locale(); rec->osarchitecture = get_osarchitecture(); rec->oslanguage = GetSystemDefaultLangID();
Modified: trunk/reactos/media/doc/README.WINE URL: http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=6... ============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Oct 26 21:29:03 2013 @@ -199,7 +199,7 @@ reactos/dll/win32/uxtheme # Forked reactos/dll/win32/vbscript # Synced to Wine-1.7.1 reactos/dll/win32/version # Autosync -reactos/dll/win32/wbemprox # Synced to Wine-1.7.1 +reactos/dll/win32/wbemprox # Synced to Wine-1.7.2 reactos/dll/win32/wer # Autosync reactos/dll/win32/windowscodecs # Synced to Wine-1.7.1 reactos/dll/win32/windowscodecsext # Synced to Wine-1.7.1