Difference between revisions of "Bz Time"

From BZFlagWiki
Jump to: navigation, search
(Added bz_Time)
(No difference)

Latest revision as of 23:54, 10 February 2009

BZFS API Documentation This page contains part of the BZFS API documentation for use by Plug-ins on the BZFS server.


bz_Time is a structure for the local time of the server.
To fill the new structure bz_Time, see bz_getLocaltime or bz_getUTCTime.

Version Changes[edit]

In BZFlag 2.0.x, bz_Time was refered to as bz_localTime.



 int year;
 int month;
 int day;
 int hour;
 int minute;
 int second;
 int dayofweek;
 bool daylightSavings;



void writeTime(int playerID){

 bz_Time st; // create new object
bz_getLocaltime(&st); // fill st with values
bz_sendTextMessagef(BZ_SERVER,playerID,"The time is %i:%i.",st.hour,st.minute); // print [hour]:[minute] to player