print(os.time())
-- 获取当前时间的字符串表示,形如:11/28/08 10:28:37
print(os.date())
-- 获取当前日期的字符串表示,形如:11/28/08
print(os.date("%x", os.time()))
-- 获取当前时间的字符串表示,形如:10:28:37
print(os.date("%X", os.time()))
-- 获取当前时间的字符串表示,形如:10/10/13 10:28:37
print(os.date("%c", os.time()))
-- 获取当前时间的字符串表示,形如:2013-10-10 10:28:37
print(os.date("%Y-%m-%d %H:%M:%S", os.time()))
-- 获取某个时间的table,有year,month,day,hour,min,sec等元素
tab = os.data(“*t,time”); //time为任意秒数
print(tab.year,tab.month,tab.day,tab.hour,tab.min,tab.sec)