Take the daylight bias into account if GetTimeZoneInformation reports that the system is in a dayligh savings aware time zone
Change-Id: I4af7d284aa9147651c246b873c6f9d613b414832
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
return double(locl - globl) * 1000.0;
#else
TIME_ZONE_INFORMATION tzInfo;
- GetTimeZoneInformation(&tzInfo);
- return -tzInfo.Bias * 60.0 * 1000.0;
+ LONG daylightBias = 0;
+ if (GetTimeZoneInformation(&tzInfo) == TIME_ZONE_ID_DAYLIGHT)
+ daylightBias = tzInfo.DaylightBias;
+ return -(tzInfo.Bias + daylightBias)* 60.0 * 1000.0;
#endif
}