Jump to content

Module:Now

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by JPxG (talk | contribs) at 18:10, 13 February 2024 (Simplest module ever and bizarre for it to not exist). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

local p = {}

p.main = function(frame)
    -- os.date provides formatted date/time strings
    -- '%y-%m-%d %H:%M:%S' formats the date as 'YY-MM-DD HH:MM:SS'
    local serverTime = os.date('!%y-%m-%d %H:%M:%S')

    return serverTime
end

return p