This wiki was in read-only mode for many years, but can now be edited again. A lot of information will need to be updated.
bz_getUTCtime
Jump to navigation
Jump to search
void bz_getUTCtime (bz_Time *ts)
Fills a bz_Time object with values for the Universal Time Coordinated (UTC) time.
Parameters:
*ts - bz_Time object to fill.
Example
Get the UTC time and display it to the user upon joining.
case bz_ePlayerJoinEvent: {
bz_Time currentTime;
bz_getUTCtime(¤tTime);
bz_sendTextMessagef(BZ_SERVER,((bz_PlayerJoinPartEventData_V1*)eventData)->playerID,"Welcome! The current date is %d/%d/%d at %d:%d:%d.",currentTime.month,currentTime.day,currentTime.year,currentTime.hour,currentTime.minute,currentTime.second);
}break;