Mirror of the 512mb.org bot on github (https://github.com/512mb-org/512mb.org-bot)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
426 B

return function(sec)
local hours = math.floor(sec/3600)
local minutes = math.floor((sec - hours*3600)/60)
local seconds = sec - (hours*3600) - (minutes*60)
hours = ((hours < 10) and ("0"..hours)) or hours
minutes = ((minutes < 10) and ("0"..minutes)) or minutes
seconds = ((seconds < 10) and ("0"..seconds)) or seconds
return ((tonumber(hours) > 0 and hours..":") or "")..minutes..":"..seconds
end