TimeTradeServer analogue for MT4 - page 2

 
Ihor Herasko:

Spread the idea around a bit, please. Started on Saturday. We have TimeCurrent() - Friday 23:59:59. Now what?

Subtract the time offset from TimeLocal.

 
fxsaber:

Subtract the time offset from TimeLocal.

And take into account the change to winter/summer time.

 
fxsaber:

Subtract the time offset from TimeLocal.

What offset?

 
Ihor Herasko:

What kind of displacement?

Let me try to guess this tune from one note. Offset between the time on the server and on the local computer))))))

I assume this is followed by a second question: how to determine it. But here too, the answer is simple: subtract from one time the other))))

And here all the questioners should pretend to understand everything, so as not to show themselves with their redundant questions from the stupid side...

That's how the forum lives here. Some pretend to explain, others pretend to understand.

And when it comes to clarifying the truth, everyone silently disperses, as if it's not the king's business, like everyone has always known and understood it.
 

fxsaber once wrotea function to get server time on weekends

MQL4/5 required functions: TimeTradeServerGMTOffset() or GetTradeServerTimeZoneInfo()
MQL4/5 required functions: TimeTradeServerGMTOffset() or GetTradeServerTimeZoneInfo()
  • 2017.10.10
  • www.mql5.com
Expert Advisors and Automated Trading: MQL4/5 required functions: TimeTradeServerGMTOffset() or GetTradeServerTimeZoneInfo()
 
Ihor Herasko:

What offset?

Between the time zones of the server and the computer.

 
Vitaly Muzichenko:

fxsaber once wrotea function to get server time on weekends

Did you look at the code, did you understand anything?

 
fxsaber:

Between server and computer time zones.

How about calling TimeCurrent() andTimeTradeServer() in MT5 and seeing the difference in their values?

 
Dmitry Fedoseev:

Did you look at the code, did you understand anything?

The code is clear, I got used to Saber's style a long time ago, his codes are minimalistic and readable.

He wrote this function at my request, for which I thank him.

 
Dmitry Fedoseev:

Can you call TimeCurrent() andTimeTradeServer() in MT5 and see how their values differ?

I can do it and see. If you have something to say, go ahead.