Scripting/Server/Functions/time

time() is Unix seconds, clock() is processor seconds as a float, date() returns a table {sec, min, hour, day, month, year, wday, yday}; pass the character 'u' as the second argument for UTC.

Syntax

time()
clock()
date([timestamp [, "u"]])

Arguments

Example

function onPlayerCommand( player, cmd, params )
{
	if ( cmd == "time" )
	{
		time();
	}
}

This sample was generated from the signature – adapt the values to your gamemode.

Section: Server information and administration

Categories: Server functions | Server information and administration