CmdStats: Converted from strtol to std::stoul

This commit is contained in:
Paul Beckingham 2015-11-01 22:06:28 -05:00
parent 037514bcbf
commit 2b8ce968fc

View file

@ -125,13 +125,13 @@ int CmdStats::execute (std::string& output)
if (task.is_blocked) ++blockedT;
if (task.is_blocking) ++blockingT;
time_t entry = strtol (task.get ("entry").c_str (), NULL, 10);
time_t entry = static_cast <time_t> (std::stoul (task.get ("entry")));
if (entry < earliest) earliest = entry;
if (entry > latest) latest = entry;
if (status == Task::completed)
{
time_t end = strtol (task.get ("end").c_str (), NULL, 10);
time_t end = static_cast <time_t> (std::stoul (task.get ("end")));
daysPending += (end - entry) / 86400.0;
}