diff --git a/src/FilamentGoogleAnalytics.php b/src/FilamentGoogleAnalytics.php index 3566033..9f839dd 100755 --- a/src/FilamentGoogleAnalytics.php +++ b/src/FilamentGoogleAnalytics.php @@ -47,7 +47,7 @@ public function trajectoryValue() public function trajectoryValueAsTimeString() { - return Carbon::createFromTimestamp($this->value)->toTimeString(); + return Carbon::createFromTimestampUTC($this->value)->toTimeString(); } public function trajectoryLabel() diff --git a/src/Traits/SessionsDuration.php b/src/Traits/SessionsDuration.php index 467b9e5..444cfc9 100644 --- a/src/Traits/SessionsDuration.php +++ b/src/Traits/SessionsDuration.php @@ -14,8 +14,8 @@ private function sessionDurationToday(): array $results = $this->get('averageSessionDuration', 'date', Period::days(1)); return [ - 'previous' => $results->first()['value'] ?? 0, - 'result' => $results->last()['value'] ?? 0, + 'previous' => $results->last()['value'] ?? 0, + 'result' => $results->first()['value'] ?? 0, ]; }