Implement NtQuerySystemInformation(SystemTimeOfDayInformation)

Rein Klazes wijn at wanadoo.nl
Wed May 18 02:24:31 CDT 2005


On Tue, 17 May 2005 23:06:51 +0200, you wrote:

> +                RtlSystemTimeToLocalTime(&sys_time, &local_time);
> +                /* liExpTimeZoneBias is not the same as tzi.Bias since it takes
> +                 * disabled DST correction into account (tested on WinXP). */
> +                local_diff.QuadPart = sys_time.QuadPart - local_time.QuadPart;

You mean the "Automatically adjust clock for daylight saving"? Wine does
not follow this silly flag and at a couple of places it depends on it. I
doubt whether it should.

> +
> +                sti->liKeBootTime       = NTDLL_BootTime;
> +                sti->liKeSystemTime     = sys_time;
> +                sti->liExpTimeZoneBias  = local_diff;
> +                sti->uCurrentTimeZoneId = RtlQueryTimeZoneInformation(&tzi);

This does not look correct. AFAIK RtlQueryTimeZoneInformation returns an
NT-status code, 0 is no success, otherwise it is an error code. Have a
look at GetTimeZoneInformation how to compute a TimeZoneId.

Rein.



More information about the wine-devel mailing list