1. Get the countdown to 0:00 of the next day
Remarks: return seconds, you can convert it yourself according to your needs
-- 获取到第二日0点的剩余时间 返回秒数
local function GetRemainSecondsTo24()
local time = os.date("*t")
local targetTime = os.time({ year = time.year, month = time.month, day = time.day, hour = 23, min = 59, sec = 59 })
return targetTime - os.time() + 1
end