pub fn time(t: option<table>) -> numberExpand description
Returns the current time, or converts a date table to a time.
§Parameters
table: a table describing a local date, with mandatory fieldsyear,monthandday, and optional fieldshour(default 12),min,sec(default 0) andisdst.
§Return value
A time value, whose meaning depends on the system — on POSIX and
Windows, the number of seconds since the epoch. When called without
arguments, the current time. The returned value can be used with
date and difftime.
§Examples
print(os.time()) --> 1788806700
print(os.time({ year = 2026, month = 9, day = 3 }))
--> 1788782400