WoW:API GetGameTime: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
({{wowapi}}, format)
Line 12: Line 12:
===Result===
===Result===
A message with the current server time appears.
A message with the current server time appears.
To use this in a macro:
/script local hour,minute = GetGameTime();DEFAULT_CHAT_FRAME:AddMessage (hour .. ":" .. minute);

Revision as of 17:01, 6 October 2007

WoW API < GetGameTime

Returns the current server time in hours and minutes

hours,minutes = GetGameTime();

Parameters

Returns

hours
Number - The current hour.
minutes
Number - The minutes passed in the current hour.

Example

local hour,minute = GetGameTime();
message(hour .. ":" .. minute);

Result

A message with the current server time appears.

To use this in a macro:

/script local hour,minute = GetGameTime();DEFAULT_CHAT_FRAME:AddMessage (hour .. ":" .. minute);