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
- any timestamp (optional)
- any "u" (optional)
Example
function onPlayerCommand( player, cmd, params )
{
if ( cmd == "time" )
{
time();
}
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
- SetServerName
- SetPassword
- SetServerRule
- RemoveBuildingForPlayer
- SyncPlayerSkins
- ReloadScripts
- LoadScript
- UnloadScript
- GetScripts
- ToggleRagdollPhysics
- ToggleVehicleDents
- LoadModule
Section: Server information and administration
Categories: Server functions | Server information and administration