OpenWrt_Luci_Lua/1_3.test_code/lua_test/test.lua

23 lines
385 B
Lua
Raw Normal View History

2015-06-28 06:39:56 +00:00
--[[print("lua")
tmp2 = os.date("!*t")
print(tmp2)
tmp = os.date("*t")
print(os.date())
print(tmp)
local x = os.time()
print(x)
]]--
print(os.date(now))
print(os.date("%x"))
print(os.date("%M"))
print(os.date("*t", now)) --table
print(os.date("!*t", now)) --UTC
--字符串形式
local tmp = os.date(now)
print(tmp)
--转table
local tmp2 = os.date("!*t", tmp)
print( os.time(tmp2))