LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
on tConvert
put 1308408220 into MySec1
put ConFromSecToTime(MySec1) into tdate
put tdate into myDate
put ConFromdateToSec(mydate) into mySec2
dansmes MySec1&return&mySec2 --•• MySec1 = 1308408220 BUT mySec2 = 1308408180
end tConvert
function ConFromSecToTime pTime
convert pTime to abbreviated date and abbreviated time
return pTime
end ConFromSecToTime
function ConFromdateToSec pDate
convert pDate to seconds
return pDate
end ConFromdateToSec
in the second function you pass the date and the hours and the minutes ( to which you converted the seconds before). So it returns the seconds up to the minute you indicate. It does not know that you want 40 seconds more