use math.floor, not math.round, when computing daysPassed on cron
This commit is contained in:
+1
-1
@@ -515,7 +515,7 @@ ready(function(model) {
|
||||
lastCron = lastCron ? new Date(lastCron) : new Date();
|
||||
DAY = 1000 * 60 * 60 * 24;
|
||||
today = new Date();
|
||||
daysPassed = Math.round((today.getTime() - lastCron.getTime()) / DAY);
|
||||
daysPassed = Math.floor((today.getTime() - lastCron.getTime()) / DAY);
|
||||
if (daysPassed > 0) {
|
||||
_(daysPassed).times(function() {
|
||||
return endOfDayTally();
|
||||
|
||||
Reference in New Issue
Block a user