Tick time is sometimes ahead of local time

 

I'm trying to compare the tick's server time with the local arrival time inside OnTick().

datetime tick_server_time = TimeCurrent();
datetime tick_local_time = TimeLocal();

After stringifying with TimeToString() and printing out:

"server_t":"11:39:14", "local_t":"11:39:13"
"server_t":"11:39:14", "local_t":"11:39:13"
"server_t":"11:39:15", "local_t":"11:39:14"
"server_t":"11:39:15", "local_t":"11:39:14"
"server_t":"11:39:15", "local_t":"11:39:14"
"server_t":"11:39:15", "local_t":"11:39:15"
"server_t":"11:39:15", "local_t":"11:39:15"
"server_t":"11:39:15", "local_t":"11:39:15"
"server_t":"11:39:15", "local_t":"11:39:15"

Why the server time is sometimes one second ahead of the local time? How could this possible? Could the server round up the time's seconds without biasing the stream? Or is it something else?

P.S. I'm on Windows 11 and OS Auto Time is on.

Documentation on MQL5: Date and Time / TimeTradeServer
Documentation on MQL5: Date and Time / TimeTradeServer
  • www.mql5.com
TimeTradeServer - Date and Time - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Maybe because one of the clocks is out of sync!
 
Fernando Carreiro #:
Maybe because one of the clocks is out of sync!

It is! I've discovered a website that let you check your time accuracy in regard to an "atomic clock":
https://time.is/

It says that "My clock is 0.9 seconds behind."

Netherlands
Netherlands
  • 2022.11.01
  • time.is
7 million locations, 57 languages, synchronized with atomic clock time.
 
Naourass Derouichi #: It is! I've discovered a website that let you check your time accuracy in regard to an "atomic clock": https://time.is/ It says that "My clock is 0.9 seconds behind."
Thank you for the information about that website. In my case, it says my computer time is exact which is good to know.