diff --git a/config/packages/twig.yaml b/config/packages/twig.yaml index aec789b..42288ce 100644 --- a/config/packages/twig.yaml +++ b/config/packages/twig.yaml @@ -1,6 +1,7 @@ twig: file_name_pattern: '*.twig' date: + format: 'm/d/Y' timezone: '%env(default:app.default.timezone:TZ)%' when@test: diff --git a/src/Tmdb/Tmdb.php b/src/Tmdb/Tmdb.php index e455147..3ad2b77 100644 --- a/src/Tmdb/Tmdb.php +++ b/src/Tmdb/Tmdb.php @@ -213,7 +213,6 @@ class Tmdb $series['episodes'][$season['season_number']] = Map::from( $client->getApi()->getSeason($series['id'], $season['season_number'])['episodes'] )->map(function ($data) { - $data['air_date'] = Carbon::parse($data['air_date'])->format('m/d/Y'); $data['poster'] = (null !== $data['still_path']) ? self::POSTER_IMG_PATH . $data['still_path'] : null; return $data; })->toArray(); diff --git a/templates/components/TvEpisodeList.html.twig b/templates/components/TvEpisodeList.html.twig index 173a0a2..c36f98b 100644 --- a/templates/components/TvEpisodeList.html.twig +++ b/templates/components/TvEpisodeList.html.twig @@ -35,9 +35,9 @@ > 0 results - + - {{ episode['air_date'] }} + {{ episode['air_date']|date }}