Internet UTC time

 

Hello,

In my libraries I was used to implement a function called InternetUtcNow(). That function just loaded the page at https://greenwichmeantime.com/time/scripts/clock-8/x.php and read the current UTC time.

Now that page is not working anymore and I was searching for a replacement or another MQL-only way to find the current UTC (GMT) time from the web.

I know I could use NTP but, again, I would like a MQL-only solution, better if self containable in a single function.


Thanks in advance!

 
A lot has changed since February 3, 2014 (Build 600) like TimeGMT
 
whroeder1:
A lot has changed since February 3, 2014 (Build 600) like TimeGMT


But TimeGMT read the current GMT from the local PC, what if my PC clock is wrong?

I need to read the current GMT from a reliable source

 
Why would it be wrong? You are connected to the internet, it defaults to updating with time.windows.com. Did you disable synchronization?
 
whroeder1:
Why would it be wrong? You are connected to the internet, it defaults to updating with time.windows.com. Did you disable synchronization?


It could be wrong for many reasons but the point is that you never know that is wrong.

I would also alert the user that is clock is de-synchronized by more than N seconds, a little but useful feature

Reason: