示例#1
0
tstring DateTime::toString() const
{
	// "2005-12-26T24:59:59" sample format
	tstring time = toTimeString( _T( "HH':'mm':'ss" ) );
	tstring date = toDateString( _T( "yyyy'-'MM'-'dd" ) );
	return date + _T( "T" ) + time;
}
示例#2
0
文件: logMessage.cpp 项目: ahars/lo21
/*!
 *  \brief Fonction permettant de retourner une chaine de caractère comportant les éléments du log.
 *  Fonction permettant de retourner une chaine de caractère comportant les éléments du log.
 *  \return Retourne les éléments du log sous forme de texte : |criticité| , date heure => message.
 */
std::string LogMessage::toString()
{
    QString tmp;

    tmp.append("|");
    tmp.append(toDateString(criticite));
    tmp.append("|, ");
    tmp.append(toDateString(date.tm_year + 1900));
    tmp.append("-");
    tmp.append(toDateString(date.tm_mon + 1));
    tmp.append("-");
    tmp.append(toDateString(date.tm_mday));
    tmp.append(" ");
    tmp.append(toDateString(date.tm_hour));
    tmp.append(":");
    tmp.append(toDateString(date.tm_min));
    tmp.append(":");
    tmp.append(toDateString(date.tm_sec));
    tmp.append(" => ");
    tmp.append(msg);
    return tmp.toStdString();
}
示例#3
0
std::string cGameDate::toString( eDateFormat format )
{
	return toDateString( format ) + dateTimeSeparator + toTimeString();
}
示例#4
0
std::string cGameDate::toDateString()
{
	return toDateString( dateFormat );
}