os.date 获取当前时间
-- 打印:年 月 日 时 分 秒
local year = tonumber(os.date("%Y",unixTime))
local month = tonumber(os.date("%m",unixTime))
local day = tonumber(os.date("%d",unixTime))
local hour = tonumber(os.date("%H",unixTime))
local minute = tonumber(os.date("%M",unixTime))
local second = tonumber(os.date("%S",unixTime))
os.time()
-- 当前时间:
print(os.date("当前中国时间:%Y年%m月%d日 %H时%M分%S秒", os.time()))
特殊说明:
以上文章,均是我实际操作,写出来的笔记资料,不会盗用别人文章!烦请各位,请勿直接盗用!转载记得标注来源!