ENH: Make default date shorter

This commit is contained in:
Andy Cedilnik 2004-08-26 09:45:20 -04:00
parent 09f7ee4480
commit 7cdf5c4601
2 changed files with 11 additions and 1 deletions

View File

@ -139,7 +139,14 @@ std::string cmCTest::CurrentTime()
struct tm* t = localtime(&currenttime); struct tm* t = localtime(&currenttime);
//return ::CleanString(ctime(&currenttime)); //return ::CleanString(ctime(&currenttime));
char current_time[1024]; char current_time[1024];
strftime(current_time, 1000, "%a %b %d %H:%M:%S %Z %Y", t); if ( m_ShortDateFormat )
{
strftime(current_time, 1000, "%b %d %H:%M %Z", t);
}
else
{
strftime(current_time, 1000, "%a %b %d %H:%M:%S %Z %Y", t);
}
//std::cout << "Current_Time: " << current_time << std::endl; //std::cout << "Current_Time: " << current_time << std::endl;
return this->MakeXMLSafe(::CleanString(current_time)); return this->MakeXMLSafe(::CleanString(current_time));
} }
@ -409,6 +416,7 @@ cmCTest::cmCTest()
{ {
m_Tests[cc] = 0; m_Tests[cc] = 0;
} }
m_ShortDateFormat = true;
m_MaximumPassedTestResultSize = 100 * 1024; m_MaximumPassedTestResultSize = 100 * 1024;
m_MaximumFailedTestResultSize = 200 * 1024; m_MaximumFailedTestResultSize = 200 * 1024;
} }

View File

@ -359,6 +359,8 @@ private:
tm_VectorOfStrings m_CustomPreMemCheck; tm_VectorOfStrings m_CustomPreMemCheck;
tm_VectorOfStrings m_CustomPostMemCheck; tm_VectorOfStrings m_CustomPostMemCheck;
bool m_InteractiveDebugMode; bool m_InteractiveDebugMode;
bool m_ShortDateFormat;
void BlockTestErrorDiagnostics(); void BlockTestErrorDiagnostics();