wbemprox: Implement Win32_OperatingSystem.LocalDateTime. (try 2)

Sylvain Petreolle spetreolle at yahoo.fr
Fri Jul 12 03:45:31 CDT 2013


De : Bruno Jesus <00cpxxx at gmail.com>

À : wine-devel at winehq.org; spetreolle at 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 <spetreolle at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20130712/6352f928/attachment.html>


More information about the wine-devel mailing list