De : Bruno Jesus <00cp...@gmail.com> À : wine-devel@winehq.org; spetreo...@yahoo.fr >Envoyé le : Jeudi 11 juillet 2013 17h14 >Objet : Re: wbemprox: Implement Win32_OperatingSystem.LocalDateTime. (try 2) > > >On Thu, Jul 11, 2013 at 11:19 AM, Sylvain Petreolle <spetreo...@yahoo.fr> >wrote: >> --- >> dlls/wbemprox/builtin.c | 30 ++++++++++++++++++++++++++++++ >> 1 file changed, 30 insertions(+) >> >> diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c >> index 9e2369a..5b7674e 100644 >> --- a/dlls/wbemprox/builtin.c >> +++ b/dlls/wbemprox/builtin.c > >> @@ -1774,6 +1778,31 @@ static WCHAR *get_lastbootuptime(void) >> + >> + GetLocalTime(&st); >> + Status = GetTimeZoneInformation(&tzi); >> + >> + if(Status == TIME_ZONE_ID_INVALID) return NULL; > >Aren't you leaking ret here? Maybe you could swap this check with the >memory allocation. >You are right. I will post a new version.
>> + sprintfW( ret, fmtW, st.wYear, st.wMonth, st.wDay, st.wHour, >> st.wMinute, st.wSecond, st.wMilliseconds * 1000, -Bias); > >Is it ok for the + sign to the fixed in the format? >The + sign ensures that the sign appears with positive and negative bias. TZ=America/New_York wine wmic os get localdatetime TZ=Europe/Berlin wine wmic os get localdatetime Best wishes, >Bruno > > Kind regards, Sylvain Petreolle