MqlTick.time_msc: UTC or broker-server time in native MQL5?

Hello,

Could you please clarify the timestamp semantics of the raw MqlTick.time_msc value returned after a successful SymbolInfoTick(“GOLD”, tick) call on a live Windows MT5 terminal?

This concerns a normal broker-provided symbol, excluding custom symbols and Strategy Tester output.

The MqlTick reference describes time_msc as the last price-update time in milliseconds, while the Python copy_ticks_range documentation explicitly refers to UTC.

My questions are:

  1. Is native MqlTick.time_msc guaranteed to represent milliseconds since 1970-01-01T00:00:00Z, independently of the broker’s timezone, or can it encode broker/server-local wall time? Does MqlTick.time use the same time basis?
  2. Does the Python documentation’s UTC statement also apply to native SymbolInfoTick and CopyTicks/CopyTicksRange? Does Python perform any timestamp normalization that native MQL5 does not?
  3. If server-local encoding is possible, is this conversion correct?

    utc_ms = raw_time_msc - offset_seconds * 1000

    Here, offset_seconds means server time minus UTC at the original tick’s instant. Is there a supported API providing that offset and its historical/DST validity intervals, or must the broker supply them?

  1. If local-time encoding is used, how should repeated timestamps during a backward DST transition be resolved?
  2. Could you provide a documented example containing a raw time_msc integer, its corresponding ISO 8601 UTC timestamp, and any offset applied, all referring to the same tick? A clearly labelled synthetic example would also help.

I understand that TimeGMTOffset concerns the local computer, not the broker’s timezone. Please distinguish platform guarantees from broker-specific configuration.

References:

MqlTick: https://www.mql5.com/en/docs/constants/structures/mqltick

Python copy_ticks_range: https://www.mql5.com/en/docs/python_metatrader5/mt5copyticksrange_py

TimeGMTOffset: https://www.mql5.com/en/docs/dateandtime/timegmtoffset

Thank you.