fix: bad date format

This commit is contained in:
2025-06-19 16:41:42 -05:00
parent 175f4330f1
commit 210c674f25
2 changed files with 3 additions and 6 deletions

View File

@@ -5,6 +5,7 @@ namespace App\Tmdb;
use Aimeos\Map;
use App\Enum\MediaType;
use App\ValueObject\ResultFactory;
use Carbon\Carbon;
use Symfony\Component\DependencyInjection\Attribute\Autowire;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\Cache\CacheInterface;
@@ -212,6 +213,7 @@ 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();