This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.


can't find correct answer, think LUA guru can help..

now = os.time() returns me 1543929730 

How correct understand this value? How convert to normal time? (hours, minutes, seconds, milliseconds?) If I want to work with minutes, or seconds, how convert this value? Is it UNIX time stamp? Please explain a little, need to use in different timers.

Sorry for basic questions just learning LUA.
It is UNIX timestamp, number of seconds from January 1st, 1970. You can use, time) to convert to human-readable date. If you need a relative value (hours, minutes etc between two timestamps) then you need to convert manually using / and % math operators.
Ok, thanks, will study more deeply.

Forum Jump: