public function withTimeZone(\DateTimeZone $timezone) : self
    {
        if ($this->timezone()->getName() === $timezone->getName()) {
            return $this;
        }

        $instance = clone $this;

        $instance->date->setTimezone($timezone);

        return $instance;
    }
public function withTimeZone(\DateTimeZone $timezone) : self
    {
        if ($this->timezone()->getName() === $timezone->getName()) {
            return $this;
        }

        $instance = clone $this;

        $instance->date->setTimezone($timezone);

        return $instance;
    }
public function withTimeZone ( \ DateTimeZone $ timezone ) : self { if ( $ this -> timezone ( ) -> getName ( ) === $ timezone -> getName ( ) ) { return $ this ; } $ instance = clone $ this ; $ instance -> date -> setTimezone ( $ timezone ) ; return $ instance ; }
Returns a new instance with the specified timezone.

@param DateTimeZone $timezone

@return DateTime
Returns a new instance with the specified timezone .