added: SessionContainer special container used by SessionManager
sessions are indexed by id and time (last used time)
changed: old sessions are deleted
parameter: session_max_iddle in the config file
added: function 'who'
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@483 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -187,4 +187,24 @@ return out.str();
|
||||
|
||||
|
||||
|
||||
const char * DateToStr(int month, int day, int hour, int min, int sec)
|
||||
{
|
||||
static const char * month_letter[] = { "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII" };
|
||||
static char buffer[100];
|
||||
|
||||
--month;
|
||||
|
||||
if( month < 0 )
|
||||
month = 0;
|
||||
|
||||
if( month > 11 )
|
||||
month = 11;
|
||||
|
||||
sprintf(buffer, "%s.%02d %02d:%02d:%02d", month_letter[month], day, hour, min, sec);
|
||||
|
||||
// warning: not thread safe (we do not use threads)
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user