determine local timezone for indicator usage

 
Hi,

I am adding some labels to my charts using a custom indicator, and the items are provided timestamped for GMT. However I am in GMT+1, and would like to handle the conversion on the fly as the labels are added. However to do that I need to access the client terminals local GMT offset - and add to the value when calling the ObjectCreate for the label.

Any idea what I can do?

Thanks,

T
 
int offset = MathRound((TimeCurrent() - TimeLocal()) / 3600.0);
 
Hi,

Because TimeCurrent is the last known server time, if the trading desk is closed, ie now. Then all the labels are wrong as;

int offset = MathRound((TimeCurrent() - TimeLocal()) / 3600.0);
Print(offset);
= -39

So all the labels would be offset 39 hours, where they should be offset 1 hour, GMT+1

Is there a dll from windows that can be loaded to get that information?

Thanks,

T
 
add a external parameter for user use it to set timezone shift,  not mothod to auto adjust since no methos to sure standard autoly.