php-tmdb / api

PHP 7.3+ API Wrapper for The Movie Database
MIT License
405 stars 113 forks source link

When a date is empty on the website, the api will instanciate a DateTime anyway #229

Closed xaviermarchegay closed 3 years ago

xaviermarchegay commented 3 years ago

So you end up with a "now" DateTime object.

It probably concerns all the dates (air date, release date, etc.)

https://github.com/php-tmdb/api/blob/a06a9858090db4b817ab022d98e53c8d7e12c06a/lib/Tmdb/Model/Tv/Episode.php#L165-L174

["airDate":"Tmdb\Model\Tv\Episode":private]=> object(DateTime)#1912 (3) { ["date"]=> string(26) "2021-01-16 18:43:34.404752" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" }

It is basically the https://github.com/php-tmdb/api/issues/180 issue but on the rest of the dates.

Regards

wtfzdotnet commented 3 years ago

@xaviermarchegay took a little break from the project after the recent large update;

I'll see if I can make some time to check on this on sunday.