public function setTimezone($timezone)
    {
        if (self::$_immutable) {
            self::$_immutable = false;
            $newDate = clone $this;
            $newDate->setTimezone($timezone);
            self::$_immutable = true;

            return $newDate;
        } else {
            return parent::setTimezone($timezone);
        }
    }
public function setTimezone($timezone)
    {
        if (self::$_immutable) {
            self::$_immutable = false;
            $newDate = clone $this;
            $newDate->setTimezone($timezone);
            self::$_immutable = true;

            return $newDate;
        } else {
            return parent::setTimezone($timezone);
        }
    }
public function setTimezone ( $ timezone ) { if ( self :: $ _immutable ) { self :: $ _immutable = false ; $ newDate = clone $ this ; $ newDate -> setTimezone ( $ timezone ) ; self :: $ _immutable = true ; return $ newDate ; } else { return parent :: setTimezone ( $ timezone ) ; } }
Sets the time zone.

@link http://php.net/manual/en/datetimeimmutable.settimezone.php

@param DateTimeZone $timezone

@return DateTimeImmutable
Sets the time zone .