unexpected behaviour datetime 840 vs 890

Back to topics list To post a new topic, please log in or register
avatar
17
franzk 2015.10.16 11:31
 

Hi,

this sample code is behaving different in the build 840 vs build 890. Is this desired behaviour? 

string tstamp = "1444977373";
Print((datetime)tstamp);
Print((datetime)(ulong)tstamp);

 

Output:

build 890
2015.10.16 11:24:23.962 test EURUSD,H1: 2015.10.16 06:36:13
2015.10.16 11:24:23.962 test EURUSD,H1: 2015.10.16 11:24:23

build 840
2015.10.16 11:25:26.729 test EURUSD,H1: 2015.10.16 06:36:13
2015.10.16 11:25:26.729 test EURUSD,H1: 2015.10.16 09:25:26

 

avatar
2017
gooly 2015.10.16 11:54 #
 

May be yu should try to use long l = StringToInteger(tstamp); Print((datetime)l);

I think this is a better way of type casting.

Back to topics list  

To add comments, please log in or register