On Tue, 27 Apr 2004 10:03:13 -0400, you wrote:
I was looking through the source code and noticed a FIXME for the GetTimeZoneInformation API in dlls/kernel/time.c saying that the function needed to return a different value if Daylight Savings Time was in effect. I implemented that feature, and also made the function return the proper value if DST was not in effect for the version being simulated.
I have enclosed the patch for the file against the latest source package.
Here is the ChangeLog entry (I didn't patch the ChangeLog file):
- dlls/kernel/time.c
William Lahti computerman413@ezrs.com
- Fixed return values in GetTimeZoneInformation
Three remarks:
- you are using ftime() of which my man page says:
| These days the contents of the timezone and dstflag fields are undefined. and | This function is obsolete. Don't use it.
Have a look at the implementation of GetDaylightFlag() or use it directly.
- You state that on NT, 2K and XP the return code is TIME_ZONE_ID_UNKNOWN when the daylight saving time is not in effect. This is only true if the transition dates are undefined. This is true in the current implementation, but those transition dates are a bigger FIXME then the correct return value.
- I am not sure if it is worth the trouble to be so correct for windows 9x. The NT return value is not impossible under win9x and unless there is an application that depends on it, Wine defaults to the NT behavior.
Rein.