Skip to content

Commit

Permalink
fixes trejectory timezone & session duration order for today v2
Browse files Browse the repository at this point in the history
  • Loading branch information
bezhanSalleh committed Oct 22, 2024
1 parent c22f8ac commit 25ec499
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/FilamentGoogleAnalytics.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions src/Traits/SessionsDuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
];
}

Expand Down

0 comments on commit 25ec499

Please sign in to comment.