diff --git a/app/Http/Controllers/Api/V1/TimeEntryController.php b/app/Http/Controllers/Api/V1/TimeEntryController.php index 02a56096..0ccc0eb4 100644 --- a/app/Http/Controllers/Api/V1/TimeEntryController.php +++ b/app/Http/Controllers/Api/V1/TimeEntryController.php @@ -74,7 +74,7 @@ public function index(Organization $organization, TimeEntryIndexRequest $request $lastDate = null; /** @var TimeEntry $timeEntry */ foreach ($timeEntries as $timeEntry) { - if ($lastDate === null || $lastDate->diffInDays($timeEntry->start->startOfDay()) > 0) { + if ($lastDate === null || abs($lastDate->diffInDays($timeEntry->start->startOfDay())) > 0) { $lastDate = $timeEntry->start->startOfDay(); } }