datetime sums

 

I'm hoping someone can confirm this for me, since I'm having a difficult time with an EA adjusting for timezones.

if I have a datetime value, and I want to add for example, 3 hours to that time, could I use this?

datetime RightNow=TimeCurrent();
int Adjust=3; //3 hours adjust
datetime Future=RightNow+(Adjust*60*60);

 Thanks for your help!

 
imtav:

I'm hoping someone can confirm this for me, since I'm having a difficult time with an EA adjusting for timezones.

if I have a datetime value, and I want to add for example, 3 hours to that time, could I use this?

 Thanks for your help!

Yes.
Reason: