You should get the daylight savings time if it's in effect. I don't know why
you're getting time that's an hour off. If the original system time correct
in UTC?
Btw there is a class to do this using P/Invoke, it's on gotdotnet I think, I
guess I should've said that earlier...
Jerry
Kevin Burton said:
You have been very helpful. I am well on my way to a good support class. I
have chosen to use managed C++ rather than P/Invoke. It is just easier for
me.
One more question. The registry has entries for the standard time zones
and there is a TIME_ZONE_INFORMATION struction associated with each of the
standard time zones. However, if I want to get the local time in the
Mountain Standard Time zone (I am in Central Time Zone) I do a
GetSystemTime() then SystemTimeToTzSpecificLocalTime using the key value
from the "Mountain Standard Time" for the TIME_ZONE_INFORMATION. If I
calculate the difference between the current time, in CT, and MT it comes
out to be 2 hours instead of 1 hour like I would expect. I am guessing that
since I passed "Mountain Standard Time" the TIME_ZONE_INFORMATION structure
that is returned is for "Mountain Standard Time" and not "Mountain Daylight
Savings Time". I see that in the structure that there are bias' for daylight
savings time and standard time. How do I detect that daylight savings time
is in effect?