Page 1 of 1

Time

Posted: Wed Jan 26, 2011 12:14 am
by balrod
Is it possible to set variable with current time and do normal math calculations with it? if so how can it be done?

Re: Time

Posted: Fri Jan 28, 2011 5:24 am
by csmall
lua has os.time() and os.date() functions built-in so you can get the date or play around with it. You probably use os.time() first then add etc and then convert it to a normal string with os.date()
Code: [show] | [select all] lua
print ( os.date("%c").."\n"..os.date("%c",os.time()+60))
Fri Jan 28 16:20:59 2011
Fri Jan 28 16:21:59 2011

Re: Time

Posted: Sat Jan 29, 2011 12:01 am
by Denarii