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.