src/Carbon/Traits/Date.php
public function setDateTimeFrom($date = null)
    {
        $date = $this->resolveCarbon($date);

        return $this->modify($date->rawFormat('Y-m-d H:i:s.u'));
    }
public function setDateTimeFrom($date = null)
    {
        $date = $this->resolveCarbon($date);

        return $this->modify($date->rawFormat('Y-m-d H:i:s.u'));
    }
public function setDateTimeFrom ( $ date = null ) { $ date = $ this -> resolveCarbon ( $ date ) ; return $ this -> modify ( $ date -> rawFormat ( 'Y-m-d H:i:s.u' ) ) ; }
Set the date and time for this instance to that of the passed instance.

@param \Carbon\Carbon|\DateTimeInterface $date

@return static
Set the date and time for this instance to that of the passed instance .