20.12.2018, 08:13
(This post was last modified: 20.12.2018, 08:13 by Erwin van der Zwart.)
Hi,
Yes there was a small issue with timezones, i did not take that into account, sorry (:
I updated the sample so use the new one or replace this function in your current script:
BR,
Erwin
Yes there was a small issue with timezones, i did not take that into account, sorry (:
I updated the sample so use the new one or replace this function in your current script:
Code:
function Calculate_Time(StairCaseTime)
if StairCaseTime > (86400 -1) then
StairCaseTime = (86400 -1)
end
local hours = math.floor(StairCaseTime / 3600 % 24)
local minutes = math.floor(StairCaseTime / 60 % 60)
local seconds = math.floor(StairCaseTime % 60)
time = {
day = 0,
hour = hours,
minute = minutes,
second = seconds,
}
return time
end
Erwin