You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
As I understand stringo, the date component is supposedly taken from the compilation time. But that doesn't gel with Milan's observation that the result is different at one call from another (assuming the same executable -- same compilation -- was used).
Of course, you would get different results at your times 00:33 and, say, 04:28 if there is a date shift in the time zone that StrToTime uses between those two times. Milan, perhaps that is/was the cause of your observation? I think it would be good to document which time zone StrToTime works in.
Stringo, it is simple to try it. Simply attach my EA StrToTime.mq4 to any chart before 1 o'clock, watch on comment and wait for time after 1. At 1:00 there will change date on comment. I state, it should change at 0:00.
P.S. I live in CET timezone and my broker time is in CET too. So, regardless to which time is StrToTime associated (either broker or local), it changes improperly.
StrToTime uses gmtime if date missing. Obtained datetime value corrected with timezone value.
Then the date shift of StrToTime would happen when CET goes from 00:59 to 01:00.
Milan, is your local time GMT+2? I don't know what means CET timezone exactly. And what is your daylight savings correction?
StrToTime uses gmtime if date missing. Obtained datetime value corrected with timezone value.