MetaQuotes-Demo XAUUSD timestamps appear two hours ahead of UTC
Hello. On MetaQuotes-Demo, symbol_info_tick("XAUUSD").time appears approximately two hours ahead of my computer’s UTC time. My computer clock appears to match an independent UTC clock.
What time basis do the Python symbol_info_tick().time and copy_rates_from_pos() candle timestamps use? Is there an official way to convert them to UTC, including daylight-saving changes?
I am testing on a demo account and have not enabled automatic trading
Please use the official documentation and publicly available information, also search Forum before posting - it was already discussed many times, for example:
Can MQL5 uniquely determine the UTC open time of historical CopyRates bars?
MT5 Python API Timestamp Discrepancy on MetaQuotes-Demo — Build 6259
NOTE: The Forum is mainly for users to:
- exchange ideas;
- discuss trading strategies, market trends, MetaTrader features and coding tips;
- share views on trading‑related and market‑related topics.
- 2026.10.09
- www.mql5.com
What time basis do the Python symbol_info_tick().time and copy_rates_from_pos() candle timestamps use? Is there an official way to convert them to UTC, including daylight-saving changes?
Just to provide you with a frame of reference so that you know what you're up against:
Forum on trading, automated trading systems and testing trading strategies
What are the MetaQuotes Time Specifications
Stanislav Korotky, 2024.11.19 15:34
To detect timezones and DST on history you can use scripts/indicators from codebase made by @amrali, or mine.
But it's not so simple with MQ Demo ;-), because it's not a broker, and the "demo" means "unstable" or at least "experimental".
Indeed MQ demo server operates in GMT+2 timezone with DST enabled for summer time, that is GMT+3.
The problem is that different symbols change their timezones under different schedules (!), which is discovered by @amrali: EURUSD quotes adhere to US_DST schedule, whereas XAUUSD adhere to EU_DST schedule. This is weird!
Hello. On MetaQuotes-Demo, symbol_info_tick("XAUUSD").time appears approximately two hours ahead of my computer’s UTC time. My computer clock appears to match an independent UTC clock.
What time basis do the Python symbol_info_tick().time and copy_rates_from_pos() candle timestamps use? Is there an official way to convert them to UTC, including daylight-saving changes?
I am testing on a demo account and have not enabled automatic trading