From 7cdf5c4601ea2a791d35fafadd890508ce434c6f Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Thu, 26 Aug 2004 09:45:20 -0400 Subject: ENH: Make default date shorter --- Source/cmCTest.cxx | 10 +++++++++- Source/cmCTest.h | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 6997de0..8cd817f 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -139,7 +139,14 @@ std::string cmCTest::CurrentTime() struct tm* t = localtime(¤ttime); //return ::CleanString(ctime(¤ttime)); 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; return this->MakeXMLSafe(::CleanString(current_time)); } @@ -409,6 +416,7 @@ cmCTest::cmCTest() { m_Tests[cc] = 0; } + m_ShortDateFormat = true; m_MaximumPassedTestResultSize = 100 * 1024; m_MaximumFailedTestResultSize = 200 * 1024; } diff --git a/Source/cmCTest.h b/Source/cmCTest.h index 301bd86..5a154fc 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -359,6 +359,8 @@ private: tm_VectorOfStrings m_CustomPreMemCheck; tm_VectorOfStrings m_CustomPostMemCheck; bool m_InteractiveDebugMode; + + bool m_ShortDateFormat; void BlockTestErrorDiagnostics(); -- cgit v0.12