Implement NtQuerySystemInformation(SystemTimeOfDayInformation)

Felix Nawothnig felix.nawothnig at
Wed May 18 14:15:05 CDT 2005

Rein Klazes wrote:
> 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.

By the way, how is this flag set?

>>+                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

Oops, right.

> look at GetTimeZoneInformation how to compute a TimeZoneId.

Well, I could just duplicate the code but wouldn't it make more sense to 
  move this code from kernel32 to ntdll and let GetTimeZoneInformation() 
call NtQuerySystemInformation()?

I dunno if this is how it's done on Windows (some of this information, 
like liExpTimeZoneBias for example, is stored in UserSharedData as an 
example program on MSDN shows) but I guess it would be more more correct?


More information about the wine-devel mailing list