[cmake-commits] hoffman committed cmCTest.cxx 1.316 1.317

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Mar 23 15:33:50 EST 2007


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv1173

Modified Files:
	cmCTest.cxx 
Log Message:
BUG: fix problem with new curl_getdate and ctest


Index: cmCTest.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCTest.cxx,v
retrieving revision 1.316
retrieving revision 1.317
diff -u -d -r1.316 -r1.317
--- cmCTest.cxx	20 Mar 2007 15:52:16 -0000	1.316
+++ cmCTest.cxx	23 Mar 2007 20:33:47 -0000	1.317
@@ -61,6 +61,12 @@
 {
   struct tm* lctime;
   time_t tctime = time(0);
+  lctime = gmtime(&tctime);
+  char buf[1024];
+  // add todays year day and month to the time in str because
+  // curl_getdate no longer assumes the day is today
+  sprintf(buf, "%d%02d%02d %s", lctime->tm_year+1900, lctime->tm_mday,
+          lctime->tm_mon, str.c_str());
   cmCTestLog(this, OUTPUT, "Determine Nightly Start Time" << std::endl
     << "   Specified time: " << str.c_str() << std::endl);
   //Convert the nightly start time to seconds. Since we are
@@ -69,7 +75,7 @@
   //is the time at which the nightly dashboard was opened or
   //will be opened on the date of the current client machine.
   //As such, this time may be in the past or in the future.
-  time_t ntime = curl_getdate(str.c_str(), &tctime);
+  time_t ntime = curl_getdate(buf, &tctime);
   cmCTestLog(this, DEBUG, "   Get curl time: " << ntime << std::endl);
   tctime = time(0);
   cmCTestLog(this, DEBUG, "   Get the current time: " << tctime << std::endl);



More information about the Cmake-commits mailing list