diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-08-18 12:52:54 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-08-18 12:52:54 (GMT) |
commit | a5bc469339d594863abe2d914f6d99a76a3704ca (patch) | |
tree | e1a12d68b6968d7b26d425039911dbaf5f46fe97 /Source/cmCTest.cxx | |
parent | fa84ecf7bf710d4052650b81bac0a16040b59b73 (diff) | |
download | CMake-a5bc469339d594863abe2d914f6d99a76a3704ca.zip CMake-a5bc469339d594863abe2d914f6d99a76a3704ca.tar.gz CMake-a5bc469339d594863abe2d914f6d99a76a3704ca.tar.bz2 |
BUG: When GetNightlyTime returns past time, fix everything. Also, return correct time when printing
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r-- | Source/cmCTest.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index fef1bfd..74e3912 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -60,6 +60,7 @@ static struct tm* GetNightlyTime(std::string str, bool verbose, bool tomorrowtag if ( verbose ) { std::cout << "Determine Nightly Start Time" << std::endl; + std::cout << " Specified time: " << str.c_str() << std::endl; } //Convert the nightly start time to seconds. Since we are //providing only a time and a timezone, the current date of @@ -75,7 +76,7 @@ static struct tm* GetNightlyTime(std::string str, bool verbose, bool tomorrowtag tctime = time(0); if ( verbose ) { - std::cout << " Get the current time: " << ntime << std::endl; + std::cout << " Get the current time: " << tctime << std::endl; } const int dayLength = 24 * 60 * 60; @@ -94,7 +95,7 @@ static struct tm* GetNightlyTime(std::string str, bool verbose, bool tomorrowtag std::cout << " Future time, subtract day: " << ntime << std::endl; } } - if ( (ntime - tctime) > dayLength ) + if ( (tctime - ntime) > dayLength ) { ntime += dayLength; if ( verbose ) |