BUG: Adjusted GetNightlyTime computation to not depend on time_t being a signed type.
This commit is contained in:
parent
33768c2797
commit
7219c7a75c
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue