Type Function Library os.* Return value Number Revision 2017.3060 Keywords os, time, date See also os.date() os.clock() system.getTimer()
Returns the current time in seconds from 1970 when called without arguments, or a time representing the date and time specified by the given table.
os.time( table )
local t = os.date( '*t' ) -- get table of current date and time print( os.time( t ) ) -- print date & time as number of seconds -- OUTPUT: 1287516614 t.min = t.min + 1 -- add one to the minute field print( os.time( t ) ) -- print number of seconds (increases by 60 seconds) -- OUTPUT: 1287516674