Error obtaining PC timezone from GetTimeZoneInformation
GetTimeZoneInformation will return the right Bias even when it return TIME_ZONE_ID_UNKNOWN, so the function TimeZoneLocal() just need be modify to:
double TimeZoneLocal() { int TZInfoArray[43]; if(GetTimeZoneInformation(TZInfoArray)==TIME_ZONE_ID_DAYLIGHT) return((TZInfoArray[0]+TZInfoArray[42])/(-60.0)); else//TIME_ZONE_ID_STANDARD or TIME_ZONE_ID_UNKNOWN return(TZInfoArray[0]/(-60.0)); }
Dear all,
I have encountered the below error(showing on the Experts tab) with getting the time zone:
Error obtaining PC timezone from GetTimeZoneInformation in kernel32.dll. Returning 0
My PC timezone is GMT (+08:00), no matter which one I set(perth, taipei, bejing), it always show the above error.
Can someone advise how to resolve it.
Source: