From: Christian ASTOR on
On 25 jan, 04:43, Jimbo <nill...(a)yahoo.com> wrote:
> Hello
>
> I am trying to use the Win32 function SystemTimeToTzSpecificLocalTime
> to get the time of a local city. And it works but, if the city is
> currently using daylight savings then my time comes out 1 hour behind.
>
> I have read in MSDN that i can use this function to take into account
> daylight savings IF I alter the TIME_ZONE_INFORMATION struct which is
> the 1st argument of the SystemTimeToTzSpecificLocalTime function.
>
> How can I alter a TIME_ZONE_INFORMATION struct to find if daylight
> savings will be active in a certain area?

If you want to get time zones, they are stored in registry (HKLM/
Software/.../Time Zones) (managed by Time Zone Editor tool (http://
www.dynawell.com/download/reskit/microsoft/win2000/tzedit.zip))
You can call GetTimeZoneInformation() for the current one.