计算今天零点时间戳方式2
function GetDayTimeInfo2() local nowUtcSec = os.time() --先计算出时区 local dateTime = os.date("!*t", nowUtcSec) --内部不加时区 local timeZoneSec = os.difftime(nowUtcSec, os.time(dateTime)) local elapseTime = math.fmod(nowUtcSec + timeZoneSec, 24 * 3600) local zeroTimestamp = nowUtcSec - elapseTime return zeroTimestamp, elapseTime end