   Check if a local timezone is using Daylight Savings
  HelloI 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?Dealing with all these windows structs & classes is sooo confusing :P Any suggestions or code how to do it would be really helpful. Maybe you could alter my code below?string controller::localTime(){    // Post: Returns focus cities local time    // NOTE AT PRESENT: function doesn't compensate for Daylight savings. Need 2 change this   SYSTEMTIME ut, cityTime;    TIME_ZONE_INFORMATION tz;   tz.Bias = focusCity->bias;    tz.StandardBias = 0;    tz.DaylightBias = -60;    /*    unused TIME_ZONE_INFORMATION struct variables    WCHAR StandardName[32];    SYSTEMTIME StandardDate;    WCHAR DaylightName[32];    SYSTEMTIME DaylightDate;    */   GetSystemTime(&ut);   SystemTimeToTzSpecificLocalTime(&tz,&ut,&cityTime);}
  Well, it seems that the TIME_ZONE_INFORMATION structure you provide is missing some values to function correctly. The StandardDate and DaylightDate members are used to set the date where the start/end of the daylight saving occurs.Fortunately, you can use the GetTimeZoneInformation function which will fill out that structure with the information of the current system configuration instead of filling it out manually like you were trying to do.   ;  Why aren't you simply using GetLocalTime?   ;  I cant use localTime() because thats not what I am trying to do. I am making an application that can tell me the current time at a series of cities(Sydney,New York, London, Tokyo, Moscow etc.)My function I supplied works perfectly EXCEPT that if a specific city is currently using Daylight savings then my fucntion produces a time that is 1 hr off. So I need to find out somehow if that city is using daylight savings or not to output the correct time.   ;  So basically the problem is to retrieve a time_zone_information from a different than the local zone.If getting the time from a net time server is out you can read the settings from the registry (butt-ugly):http://stackoverflow.com/questions/466071/how-do-i-get-a-specific-timezoneinformation-struct-in-win32