BUG: Adjusted GetNightlyTime computation to not depend on time_t being a signed type.

This commit is contained in:
Brad King 2005-03-25 08:05:21 -05:00
parent 33768c2797
commit 7219c7a75c
1 changed files with 2 additions and 2 deletions

View File

@ -93,12 +93,12 @@ struct tm* cmCTest::GetNightlyTime(std::string str,
std::cout << " Future time, subtract day: " << ntime << std::endl; std::cout << " Future time, subtract day: " << ntime << std::endl;
} }
} }
if ( (tctime - ntime) > dayLength ) if ( tctime > (ntime + dayLength) )
{ {
ntime += dayLength; ntime += dayLength;
if ( verbose ) if ( verbose )
{ {
std::cout << " Past time, subtract day: " << ntime << std::endl; std::cout << " Past time, add day: " << ntime << std::endl;
} }
} }
//std::cout << "nightlySeconds: " << ntime << std::endl; //std::cout << "nightlySeconds: " << ntime << std::endl;