#5657 Merge core changes

This commit is contained in:
Andrew Nelless
2016-10-15 12:03:55 +01:00
11 changed files with 199 additions and 32 deletions

View File

@@ -112,13 +112,16 @@ time_t
SerialKey::daysLeft(time_t currentTime) const
{
unsigned long long timeLeft = 0;
unsigned long long const day = 60 * 60 * 24;
if (currentTime < m_expireTime) {
timeLeft = m_expireTime - currentTime;
}
unsigned long long day = 60 * 60 * 24;
unsigned long long dayLeft = 0;
dayLeft = timeLeft % day != 0 ? 1 : 0;
return timeLeft / day;
return timeLeft / day + dayLeft;
}
std::string