函数名

os.time([table])

函数介绍

方法名称:获取时间戳

方法说明:默认获取当前时间戳,也可以指定table参数

函数例子

local time = os.time()
local hour = os.date("*t", time).hour
print(hour)