Skip to content

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

Description

@xaviermarchegay

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

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

public function setAirDate($airDate)
{
if (!$airDate instanceof DateTime) {
$airDate = new DateTime($airDate);
}
$this->airDate = $airDate;
return $this;
}

["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 #180 issue but on the rest of the dates.

Regards

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions