瀏覽代碼

BUG: Fix Bug #310 - CTest sends wrong time to cvs on Windows

Andy Cedilnik 22 年之前
父節點
當前提交
e92779a657
共有 1 個文件被更改,包括 7 次插入3 次删除
  1. 7 3
      Source/cmCTest.cxx

+ 7 - 3
Source/cmCTest.cxx

@@ -536,11 +536,15 @@ int cmCTest::UpdateDirectory()
     {
     {
     struct tm* t = ::GetNightlyTime(m_DartConfiguration["NightlyStartTime"]);
     struct tm* t = ::GetNightlyTime(m_DartConfiguration["NightlyStartTime"]);
     char current_time[1024];
     char current_time[1024];
-    strftime(current_time, 1000, "%Y-%m-%d %H:%M:%S %Z", t);
+    sprintf(current_time, "%04d-%02d-%02d %02d:%02d:%02d UTC",
+      t->tm_year + 1900,
+      t->tm_mon + 1,
+      t->tm_mday,
+      t->tm_hour,
+      t->tm_min,
+      t->tm_sec);
     std::string today_update_date = current_time;
     std::string today_update_date = current_time;
    
    
-    //std::string today_update_date = current_time + 
-    //  m_DartConfiguration["NightlyStartTime"];
     extra_update_opts += "-D \"" + today_update_date +"\"";
     extra_update_opts += "-D \"" + today_update_date +"\"";
     //std::cout << "Update: " << extra_update_opts << std::endl;
     //std::cout << "Update: " << extra_update_opts << std::endl;
     }
     }