timegmt() in tester is rubbish
In live I can use timegmt vs timecurrent to get the offset of the data, which means all my code can correctly use UTC times everywhere and be corrected regardless of the datasource.
How are we supposed to do any kind of time related testing when there seems to be NO way to get the UTC offset of the data?
This seems really obvious. but can we please make timegmt() work properly in the tester?
It's not obvious. You need to know the GMT zone and DST of the broker server, from there it's possible to calculate correctly. As you noticed GMT offset can be deduced from mql, but it's not possible for DST, you need to ask to your broker.
The data used in the tester is from a specific broker. Can MT not just store the broker time offset locally on the broker settings so that it is available in the testing infrastructure?
In live I can use timegmt vs timecurrent to get the offset of the data, which means all my code can correctly use UTC times everywhere and be corrected regardless of the datasource.
How are we supposed to do any kind of time related testing when there seems to be NO way to get the UTC offset of the data?
This seems really obvious. but can we please make timegmt() work properly in the tester?