Would be nice to have function to check current time - I need it to my auto relogger, and I guess will be usefull for other aswell.
I checked docs and didn't find it. If this function already exist, then sorry :P
Would be nice to have function to check current time - I need it to my auto relogger, and I guess will be usefull for other aswell.
I checked docs and didn't find it. If this function already exist, then sorry :P
tosec(time())
converts the current time to seconds
Check Raphael Library. He has some functions that returns the current time in UCT, CET, etc.
One of these should suit your needs:
os.date('%X') -- 10:43:27
os.date('%H:%M') -- 10:43
os.date('%d/%m/%Y - %H:%M') -- 15/12/2013 10:43
If you need it as number of seconds, though:
os.time() -- 1387111633