Skip to content

Commit

Permalink
Collection route should use converted date
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean committed Feb 28, 2025
1 parent ff3691e commit 4445e8c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Entries/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -891,11 +891,13 @@ public function routeData()
]);

if ($this->hasDate()) {
$date = $this->date()->setTimezone(config('statamic.system.display_timezone'));

$data = $data->merge([
'date' => $this->date(),
'year' => $this->date()->format('Y'),
'month' => $this->date()->format('m'),
'day' => $this->date()->format('d'),
'date' => $date,
'year' => $date->format('Y'),
'month' => $date->format('m'),
'day' => $date->format('d'),
]);
}

Expand Down

0 comments on commit 4445e8c

Please sign in to comment.