lua中读取时间

来源:互联网 发布:java的集成开发环境 编辑:程序博客网 时间:2024/06/01 10:40

local time = timestampAlign10(StringUtils:Time())


local timeNow = StringUtils:FormatTime("%Y%m%d%H%M%S",time);


if type == "Tim" then  ---------当前时分秒
local tim = tonumber(timeNow) % 1000000;
return tim;
elseif type == "Day" then  -------当前月日
local dayNow = StringUtils:FormatTime("%Y%m%d",time);
return tonumber(dayNow);
else  ------------年月日,时分秒
return tonumber(timeNow);
end
0 0