gluon/scripts/rfc3339date.lua
2014-07-21 03:44:53 +02:00

6 lines
169 B
Lua

local time = os.time()
local timestamp = os.date('%F %T', time)
local timezone = os.date('%z', time):gsub('^([%+%-]%d%d)(%d%d)$', '%1:%2')
print(timestamp .. timezone)