Getting GMT-Time with WebRequest() - page 2 12 New comment amrali 2021.08.16 21:33 #11 You need a web service that has json response Try this code: #include <StringUtils.mqh> // https://www.mql5.com/en/code/35395 string Read_URL(string _url,bool ShowErrorMessage); void OnStart() { string response = Read_URL("https://worldtimeapi.org/api/timezone/Etc/GMT",true); string unixtime = StringSubstrAfter(response, "\"unixtime\":", 10); Print("GMT = ", (datetime)(ulong)unixtime); } Florian Riedrich 2021.08.17 08:05 #12 amrali: You need a web service that has json response Try this code: Thank you for the code. It seems it is for MT5 only? For MT4 I get an error: 'ArrayReverse' - function not defined StringUtils.mqh 699 4 Florian Riedrich 2021.08.17 08:06 #13 Alain Verleyen: For example.https://stackoverflow.com/questions/50885249/how-to-get-gmt-by-using-google-time-zone-api There are others API available. Thank you as well. Is there a way to implement this in mql? 12 New comment
You need a web service that has json response
Try this code:
You need a web service that has json response
Try this code:
Thank you for the code. It seems it is for MT5 only?
For MT4 I get an error:
'ArrayReverse' - function not defined StringUtils.mqh 699 4
For example.
https://stackoverflow.com/questions/50885249/how-to-get-gmt-by-using-google-time-zone-api
There are others API available.
Thank you as well.
Is there a way to implement this in mql?