API time

Returns a timestamp for the specified time or the current Unix time. timestamp = time([dateTable])

Arguments

 * dateTable : table ? - Table specifying a date/time to return the timestamp of; if omitted, a timestamp for the current time (per the local clock) will be returned. This table must have fields,  , and  , and may have fields  ,  ,  , and  . For a description of these fields, see the Lua reference manual.

Returns

 * timestamp : number - The time for, otherwise time in seconds since the epoch.

Details

 * This function is Lua's standard os.time, shifted into the global namespace.
 * If not given any arguments,  will return a value based on the local clock, so it is not synchronized among clients. Consider using  instead if you would rather have a value based on the server clock, which IS synchronized among clients.

Example
Prints the current Unix time from the local machine's clock. /dump time > 1118722038

Prints the Unix timestamp for a specific date. local dateTbl = { year = 2004, month = 11, day = 23, } print(time(dateTbl)) > 1101207600