Lua formatting time, converting the number of milliseconds into corresponding days, minutes, seconds