Function translatetimelong() As Long
Dim timeshift As Word
translatetimelong = 0
Gosub getdatetime
timeshift = time(0) / 2
translatetimelong.LW = timeshift
timeshift = ShiftLeft(time(1), 5)
translatetimelong.LW = translatetimelong.LW + timeshift
timeshift = ShiftLeft(time(2), 11)
translatetimelong.LW = translatetimelong.LW + timeshift
timeshift = time(4)
translatetimelong.HW = timeshift
timeshift = ShiftLeft(time(5), 5)
translatetimelong.HW = translatetimelong.HW + timeshift
time(6) = time(6) + 20
timeshift = ShiftLeft(time(6), 9)
translatetimelong.HW = translatetimelong.HW + timeshift
End Function
Proc translatelongtime(number As Long)
time(0) = number.LW And 0x1f
time(0) = time(0) * 2
time(1) = ShiftRight(number.LW, 5)
time(1) = time(1) And 0x3f
time(2) = ShiftRight(number.LW, 11)
time(2) = time(2) And 0x3f
time(4) = number.HW And 0x1f
time(5) = ShiftRight(number.HW, 5)
time(5) = time(5) And 0x1f
time(6) = ShiftRight(number.HW, 9)
time(6) = time(6) And 0x3f
time(6) = time(6) - 20
End Proc