FIX: SetTimeZoneInformation() May Alter the System Time (235955)
The information in this article applies to:
- Microsoft Win32 Application Programming Interface (API), when used with:
- the operating system: Microsoft Windows NT 4.0
This article was previously published under Q235955 SYMPTOMS
The SetTimeZoneInformation() function sets the current time-zone parameters. These parameters control translations from Coordinated Universal Time (UTC) to the local time.
If the time-zone parameters are configured for a time zone that does not observe daylight saving time, a call to SetTimeZoneInformation() sets the time-zone parameters, but it may also change the system time.
NOTE: This bug occurs only if the time zone selected at startup time does not observe daylight saving time.
CAUSERESOLUTION
The following algorithm can be used to work around this problem:
- Obtain the current system time by calling GetSystemTime().
- Issue a call to SetTimeZoneInformation() and specify the time zone you want to set.
- Call GetSystemTime() again to determine whether the system time has been altered. If the system time has been altered, set it back to the original time using SetSystemTime().
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
MORE INFORMATION
Modification Type: | Minor | Last Reviewed: | 11/19/2003 |
---|
Keywords: | kbAPI kbbug kbDateTime kbfix kbKernBase KB235955 |
---|
|