src/LocalDateTime.php
public function withTime(LocalTime $time) : LocalDateTime
    {
        if ($time->isEqualTo($this->time)) {
            return $this;
        }

        return new LocalDateTime($this->date, $time);
    }
public function withTime(LocalTime $time) : LocalDateTime
    {
        if ($time->isEqualTo($this->time)) {
            return $this;
        }

        return new LocalDateTime($this->date, $time);
    }
public function withTime ( LocalTime $ time ) : LocalDateTime { if ( $ time -> isEqualTo ( $ this -> time ) ) { return $ this ; } return new LocalDateTime ( $ this -> date , $ time ) ; }
Returns a copy of this LocalDateTime with the time altered.

@param LocalTime $time

@return LocalDateTime
Returns a copy of this LocalDateTime with the time altered .