Commit a0e71e77 authored by Brad King's avatar Brad King
Browse files

BUG: It is possible for the nightly start time to be over 24 hours in the...

BUG: It is possible for the nightly start time to be over 24 hours in the future which requires two days to be subtracted.  Using a while loop to make sure enough days are added or subtracted.  It should never be able to iterate more than twice.
parent 3bb990dc
......@@ -79,7 +79,7 @@ struct tm* cmCTest::GetNightlyTime(std::string str,
const int dayLength = 24 * 60 * 60;
//std::cout << "Seconds: " << tctime << std::endl;
if ( ntime > tctime )
while ( ntime > tctime )
{
// If nightlySeconds is in the past, this is the current
// open dashboard, then return nightlySeconds. If
......@@ -93,7 +93,7 @@ struct tm* cmCTest::GetNightlyTime(std::string str,
std::cout << " Future time, subtract day: " << ntime << std::endl;
}
}
if ( tctime > (ntime + dayLength) )
while ( tctime > (ntime + dayLength) )
{
ntime += dayLength;
if ( verbose )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment