How to get a date (month, day, year) from the number of seconds passed since January 1, 1970 in Lua?

后端 未结 0 609
别那么骄傲
别那么骄傲 2021-01-31 08:03

I have this so far:

function Date(T)
    if not T then return "never" end
    local Z = math.floor(T/86400)+719468
    local ERA = math.floor(Z/146097)
         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题