Your time-zone is irrelevant. The function returns the most recent time by the trade server (their time-zone), and during weekends, most brokers don't have any trade activity, so their "time" freezes.
When in doubt, remember to consult the documentation ... Documentation on MQL5: Date and Time / TimeCurrent
If you want the local time, use ... Documentation on MQL5: Date and Time / TimeLocal
Fernando Carreiro #:
If you want the local time, use ... Documentation on MQL5: Date and Time / TimeLocal
If you want the local time, use ... Documentation on MQL5: Date and Time / TimeLocal
Thank you Fernando, I will wait till monday before jumping to other conclusions...
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
Greetings,
Have picked up MQL programming after a few years and started with a very simple script. Nothing more then getting the tiem of the server. BUT despite the simplicity of this small piece of code this method returns a datetime in the near past which is: "2025.08.01 23:59" .
When I execute this script it is definitally the second day of July and two o'clock in the afternoon (my time zone UTC+2).
What am I overlooking?