Kbase 20276: Time Zone Problems Running Version 8.2, 8.3 on Win95/98/NT
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/03/2009 |
|
Status: Unverified
SYMPTOM(s):
Problems switching time zone from Daylight Savings to Standard time on the correct day.
The problem appears only on the last Sunday in October.
FACT(s) (Environment):
Windows 32 Intel
Windows NT 32 Intel/Windows 2000
Progress 8.x
CAUSE:
The C run-time function localtime() incorrectly fills the tm_isdst member of the returning struct tm when it is executed in a time zone that does not switch from Daylight Savings to Standard time on the same date that the U.S. time zones make the switch. The C Runtime Function localtime() apparently does not consider the time zone. Instead, it assumes that the switch to Standard time always occurs on the last Sunday in October.
Microsoft has confirmed this to be a bug in the Microsoft products listed above. This bug was corrected in Microsoft Visual C++, 32-bit Edition, Version 4.1.
FIX:
There are four workarounds you can choose from:
1. Use the return value of the Win32 SDK function GetTimeZoneInformation, which returns a DWORD. A return value of TIME_ZONE_ID_STANDARD or TIME_ZONE_ID_DAYLIGHT indicates whether the system time has been adjusted for daylight savings time.
GetTimeZoneInformation correctly considers the current system time zone settings and adjusts on the proper date. (See the documentation for GetTimeZoneInformation because there are other possible return values.)
2. Look at the following document in the Microsoft Knowledge Base:
For Visual C++ 2.x: Q123464, "How to Obtain Visual C++ 2.0 Run-Time Library Source Code". 3. Temporarily change the Time Zone for some zone that has the same local time.
For example: change From the Brazilian time zone to Buenos Aires time zone. 4. Use the ATTRIBUTE session:time-source="dbname" to get the database time.
5. Uncheck the Automatically adjust clock for daylight saving changes setting in the control panel under the date and time properties. Once that is deselected, adjust the time manually to the expected time. Verify by running display string(time,HH:MM:SS) or checking a database log file and compare to the system time.