From 28ed18dd0b5ccece41a50a24bc558176d5fcc103 Mon Sep 17 00:00:00 2001 From: Obinna Ikeh Date: Wed, 22 Jan 2025 16:56:45 +0100 Subject: [PATCH] set start_date from 3 months ago for cluster date --- src/backend/app/Services/ClustersDashboardCacheDataService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/app/Services/ClustersDashboardCacheDataService.php b/src/backend/app/Services/ClustersDashboardCacheDataService.php index 58a7750c7..89ac2a6fa 100644 --- a/src/backend/app/Services/ClustersDashboardCacheDataService.php +++ b/src/backend/app/Services/ClustersDashboardCacheDataService.php @@ -24,7 +24,8 @@ public function __construct( public function setData($dateRange = []) { if (empty($dateRange)) { - $startDate = date('Y-01-01'); // first day of the year + // Set $startDate to 3 months ago + $startDate = date('Y-m-d', strtotime('-3 months')); $endDate = date('Y-m-d H:i:s', strtotime('today')); $dateRange[0] = $startDate; $dateRange[1] = $endDate;