Geeft de huidige tijd terug zonder argumenten, of de tijd en datum gespecificeerd door een opgegeven tabel.
Gebruik en Argumenten
os.time([ table ])
- table: (optioneel) Deze tabel moet deze velden hebben; year(vier digits), month(1-12), day(1-31). Hier kan men ook de tijd meegegeven met de volgende velden; hour(0-23), min(0-59), sec(0-61) en isdst( daylight saving time boolean)
Waarden die teruggeven worden
number: de tijd (specifiek of door een tabel opgegeven) in seconden sinds de epoch.
Voorbeeld
--Create a LUA table with a time in it. in this case 29 december 1995 8:47pm
local t = {}
t.year = 1995
t.month = 12
t.day = 29
t.hour = 20
t.min = 47
t.sec = 0
--This could be expressed all in one line:
local t2 = {year = 1995,month = 12,day = 29,hour = 20,min = 47,sec = 0}
--Output the current time to the debug console
fibaro:debug(os.time())
--Output the time in the table to the debug console
fibaro:debug(os.time(t))
