Android Question Datetime.time BUG

RuudS

New Member
Hi All,

I live within the timezone GMT+1, When i calc 850 seconds with the Datetime.time function it gives one hour extra.

Look at this code :

Dim u_sec, u_min, u_hour
u_sec = Floor( 850 Mod 60 )
u_min = Floor( 850 / 60 Mod 60 )
u_hour = Floor( 850 / 3600 Mod 24 )
Log( u_hour & " " & u_min & " " & u_sec )
Log( DateTime.Time( DateTime.TicksPerSecond * 850 ) )

Is this timezone related perhaps ? Has someone else encouterd this problem in the past ?

Greetz Ruud
 

RuudS

New Member
Erel,

01/01/1970 00:14:10 = 850 secs * ticksPerSec

Datetime.date( 850 * ticksPerSec ) should give "1/1/1970" and it does
Datetime.time( 850 * ticksPerSec ) should give "00:14:10" and not "01:14:10"

Strange, why is one hour added ?

The function you provided works - ty!
 
Last edited:
Upvote 0
Top