This forum is in read-only mode now. You may discuss your questions on forums of MQL4.community and MQL5.community
LocalTime not returning correct value after build 186 upgradeBack to topics list |
|
Barrys
2005.11.14 22:15
Hi
Is anybody else have problems with LocalTime() returning a incorrect value after the build 186 upgrade? With build 184 it's working 100% Barry |
|
GT48aec42c270a6
2005.11.15 09:54
I tested it out in a simple script and it seems to be working fine for me
#property copyright ""
#property link ""
int start(){
Alert(TimeToStr(LocalTime(),TIME_DATE|TIME_MINUTES));
return(0);
} |
|
Barrys
2005.11.15 10:41
acordingly to the help :
" datetime LocalTime( ) Returns local computer time, number of seconds elapsed from 00:00 January 1, 1970. " Try: Print(" CurTime: " , TimeToStr( CurTime() ) , " LocalTime: " ,TimeToStr( LocalTime() )); change your pc's time ( hours ) , localtime should change as well , in build 184 it did in build 186 it stay the same if you change minutes or the date it works , it's just the Hour that's not changing unless the localtime is GMT time ? |
|
GT48aec42c270a6
2005.11.15 17:30
I tried your code above, and still don't have any problems.
I ran the code once and it showed the correct time for both values..then I changed my computer clock and re-ran and still showed the correct changed value for local time and the correct value for server time. I don't know what to say. Its working fine for me. |
|
Slawa
2005.11.16 11:28
Barrys, try to adjust daylight saving
![]() |
|
Barrys
2005.11.16 17:36
i'm in gmt+2 time zone ( South Africa Pretoria) , localtime return 2 hours less than my PC time whitch is gmt time the and I've change the expert to work with that . all sorted Thanks |
Download MetaTrader 5 (450 Kb, web installer) — a new terminal for financial markets

