TimeGMT() function

 

I have a bug on TimeGMT() function,  the returned time is 1 hour more than real GMT time.

I'm at Bkk at this time (GMT +7), no summer time.

However TimeGMTOffset() return the good value

I solve the problem by this function : 

datetime NewTimeGMT( MqlDateTime &dt )

{

   datetime now = TimeLocal();

   now += TimeGMTOffset();

   TimeToStruct( now, dt );

    return now;

 An idea ?

Thanks. 

Documentation on MQL5: Date and Time / TimeGMT
  • www.mql5.com
Date and Time / TimeGMT - Documentation on MQL5
Reason: