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)); }
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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: