Weird calculation of time with os.date?
Posted: Tuesday 02 May 2017 17:59
Hi all,
I try to convert elapsed time from second into hours and minutes with os.date("%I:%M",diff)) but I dont understand why this is not working..
Command:
print ("UNIT Run time." .. diff .. " sec - " .. os.date("%H:%M",diff));
Log:
LUA: UNIT Run time. 306 sec - 01:05
WHY is 306 seconds display as 1 hour 5 minutes when it is just 5 minutes?
How to do this correctly?
I try to convert elapsed time from second into hours and minutes with os.date("%I:%M",diff)) but I dont understand why this is not working..
Command:
print ("UNIT Run time." .. diff .. " sec - " .. os.date("%H:%M",diff));
Log:
LUA: UNIT Run time. 306 sec - 01:05
WHY is 306 seconds display as 1 hour 5 minutes when it is just 5 minutes?
How to do this correctly?