This is a bit offtopic, but I was just going over your site, and noticed this topic about producing the local server time:
http://z4.invisionfree.com/ProgrammingAnDstuff/index.php?showtopic=249
Anyhow, here is another way to do it also:
//convert a duration of time in seconds into a human readable string
void G_Tools_TimeToString(time_t *seconds, char *buffer, int bufferSize) {
//declare variables
struct tm *t;
char am_pm[] = "AM";
//convert to local time
t = localtime(seconds);
//make sure we have the right extension
if(t->tm_hour >= 12) {
strcpy( am_pm, "PM" );
}
//convert time from 24hour to 12hour
if(t->tm_hour > 12) {
t->tm_hour -= 12;
}
//set to 12 if it's midnight
if(t->tm_hour == 0) {
t->tm_hour = 12;
}
//copy the result to the output buffer
Com_sprintf(buffer, bufferSize, "%.19s %s
", asctime(t), am_pm);
}