I've was trying to display the time between 2 events in hours, minutes and seconds using this type of code
I expected this to display:
but instead it displayed:
My Local time is currently GMT (CST) and DateTime.TimeZoneOffset =0
Time(0) shows as Thu 01 Jan 1970 01:00:00
Is this the expected result?
Derek
B4X:
Sub TestSub
Dim t1, t2 As Long
t1=DateTime.now
Sleep(5000)
t2=DateTime.now
Log("Elapsed time: " & DateTime.time(t2-t1))
End Sub
I expected this to display:
Elapsed time: 00:00:05
but instead it displayed:
Elapsed time: 01:00:05
So the duration displayed an extra hour.
My Local time is currently GMT (CST) and DateTime.TimeZoneOffset =0
Time(0) shows as Thu 01 Jan 1970 01:00:00
Is this the expected result?
Derek
Last edited: