[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: wbemprox: Implement Win32_OperatingSystem.LocalDateTime.
From:       Hans Leidekker <hans () codeweavers ! com>
Date:       2013-06-24 8:07:38
Message-ID: 1372061258.5015.14.camel () t400
[Download RAW message or body]

On Sun, 2013-06-23 at 18:55 +0200, Sylvain Petreolle wrote:
> +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','0','0',0};
> +    SYSTEM_TIMEOFDAY_INFORMATION ti;
> +    TIME_FIELDS tf;
> +    WCHAR *ret;
> +
> +    if (!(ret = heap_alloc( 26 * sizeof(WCHAR) ))) return NULL;
> +
> +    NtQuerySystemInformation( SystemTimeOfDayInformation, &ti, sizeof(ti), NULL );
> +    RtlTimeToTimeFields( &ti.liKeBootTime, &tf );
> +    sprintfW( ret, fmtW, tf.Year, tf.Month, tf.Day, tf.Hour, tf.Minute, tf.Second, \
> tf.Milliseconds * 1000 ); +    return ret;
> +} 

This will not return local time.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic