From c54204ede9d0673f1c838117093672530f39bcbf Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 3 May 2020 19:38:03 +0200 Subject: [PATCH] Fix #3330 --- app/Helpers/Collector/Extensions/TimeCollection.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Helpers/Collector/Extensions/TimeCollection.php b/app/Helpers/Collector/Extensions/TimeCollection.php index 4dc8e52213..8b2e748970 100644 --- a/app/Helpers/Collector/Extensions/TimeCollection.php +++ b/app/Helpers/Collector/Extensions/TimeCollection.php @@ -91,8 +91,9 @@ trait TimeCollection if ($end < $start) { [$start, $end] = [$end, $start]; } - $startStr = $start->format('Y-m-d H:i:s'); - $endStr = $end->format('Y-m-d H:i:s'); + // always got to end of day / start of day for ranges. + $startStr = $start->format('Y-m-d 00:00:00'); + $endStr = $end->format('Y-m-d 23:59:59'); $this->query->where('transaction_journals.date', '>=', $startStr); $this->query->where('transaction_journals.date', '<=', $endStr); @@ -117,4 +118,4 @@ trait TimeCollection return $this; } -} \ No newline at end of file +}