Time

Post Reply
balrod
Posts: 1
Joined: Wed Jan 26, 2011 12:12 am

Time

Post 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?

csmall
Posts: 20
Joined: Wed Jan 12, 2011 9:36 pm

Re: Time

Post 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

Denarii
Posts: 111
Joined: Thu Dec 03, 2009 10:54 pm

Re: Time

Post by Denarii »


Post Reply