diff --git a/Classes/Utility/PageSpeedInsightsUtility.php b/Classes/Utility/PageSpeedInsightsUtility.php index 57d6a10..f5fae6c 100644 --- a/Classes/Utility/PageSpeedInsightsUtility.php +++ b/Classes/Utility/PageSpeedInsightsUtility.php @@ -203,7 +203,7 @@ public static function getLastRun($pageId = 0, $strategy = ''): string * @param string $labelFormat * @return array */ - public static function getChartData($daysInPastToStartFrom, $daysPerStep, $pageId = 0, $strategy = '', $chartColor1 = '', $chartColor2 = '', $chartColor3 = '', $chartColor4 = '', $chartColor5 = '', $labelFormat = '%d-%m-%Y'): array + public static function getChartData($daysInPastToStartFrom, $daysPerStep, $pageId = 0, $strategy = '', $chartColor1 = '', $chartColor2 = '', $chartColor3 = '', $chartColor4 = '', $chartColor5 = '', $labelFormat = 'd-m-Y'): array { $labels = []; $dataPerformance = []; @@ -213,7 +213,7 @@ public static function getChartData($daysInPastToStartFrom, $daysPerStep, $pageI $dataPwa = []; for ($daysBefore = $daysInPastToStartFrom; $daysBefore >= 0; $daysBefore-=$daysPerStep) { - $labels[] = strftime($labelFormat, strtotime('-' . $daysBefore . ' day')); + $labels[] = date($labelFormat, strtotime('-' . $daysBefore . ' day')); $startPeriod = strtotime('-' . $daysBefore . ' day 0:00:00'); $endPeriod = strtotime('-' . ($daysBefore - $daysPerStep + 1) . ' day 23:59:59');