public function setTimezone(\DateTimeZone $timezone = null)
    {
        if (!$timezone) {
            $timezone = $this->contactClient->getScheduleTimezone();
            if (!$timezone) {
                $timezone = $this->coreParametersHelper->getParameter(
                    'default_timezone'
                );
                $timezone = !empty($timezone) ? $timezone : date_default_timezone_get();
            }
            $timezone = new \DateTimeZone($timezone);
        }
        $this->timezone = $timezone;
        $this->now->setTimezone($timezone);

        return $this;
    }
public function setTimezone(\DateTimeZone $timezone = null)
    {
        if (!$timezone) {
            $timezone = $this->contactClient->getScheduleTimezone();
            if (!$timezone) {
                $timezone = $this->coreParametersHelper->getParameter(
                    'default_timezone'
                );
                $timezone = !empty($timezone) ? $timezone : date_default_timezone_get();
            }
            $timezone = new \DateTimeZone($timezone);
        }
        $this->timezone = $timezone;
        $this->now->setTimezone($timezone);

        return $this;
    }
public function setTimezone ( \ DateTimeZone $ timezone = null ) { if ( ! $ timezone ) { $ timezone = $ this -> contactClient -> getScheduleTimezone ( ) ; if ( ! $ timezone ) { $ timezone = $ this -> coreParametersHelper -> getParameter ( 'default_timezone' ) ; $ timezone = ! empty ( $ timezone ) ? $ timezone : date_default_timezone_get ( ) ; } $ timezone = new \ DateTimeZone ( $ timezone ) ; } $ this -> timezone = $ timezone ; $ this -> now -> setTimezone ( $ timezone ) ; return $ this ; }
Set Client timezone, defaulting to Mautic or System as is relevant.

@param \DateTimeZone $timezone

@return $this
Set Client timezone defaulting to Mautic or System as is relevant .