getRealTime
Shared
Returns the computer's real date and time, in the local time zone.
table getRealTime()
Returns
A table with second, minute, hour, monthday (1 to 31), month (0 to 11), year (years since 1900), weekday (0 = Sunday), yearday (0 to 365) and timestamp (seconds since 1970).
Example
local now = getRealTime()
print(("%02d/%02d/%04d %02d:%02d"):format(now.monthday, now.month + 1, now.year + 1900, now.hour, now.minute))Note
month starts at 0 and year counts from 1900: add 1 and 1900 to show the date.