concrete/src/Install/InstallerOptions.php
public function getServerTimeZone($fallbackToDefault)
    {
        $timeZoneId = $this->getServerTimeZoneId();
        if ($timeZoneId === '') {
            if (!$fallbackToDefault) {
                throw new UserMessageException(t('The server time zone has not been defined.'));
            }
            $timeZoneId = @date_default_timezone_get() ?: 'UTC';
        }
        try {
            $result = new DateTimeZone($timeZoneId);
        } catch (Exception $x) {
            $result = null;
        }
        if ($result === null) {
            throw new UserMessageException(t('Invalid server time zone: %s', $timeZoneId));
        }

        return $result;
    }
public function getServerTimeZone($fallbackToDefault)
    {
        $timeZoneId = $this->getServerTimeZoneId();
        if ($timeZoneId === '') {
            if (!$fallbackToDefault) {
                throw new UserMessageException(t('The server time zone has not been defined.'));
            }
            $timeZoneId = @date_default_timezone_get() ?: 'UTC';
        }
        try {
            $result = new DateTimeZone($timeZoneId);
        } catch (Exception $x) {
            $result = null;
        }
        if ($result === null) {
            throw new UserMessageException(t('Invalid server time zone: %s', $timeZoneId));
        }

        return $result;
    }
public function getServerTimeZone ( $ fallbackToDefault ) { $ timeZoneId = $ this -> getServerTimeZoneId ( ) ; if ( $ timeZoneId === '' ) { if ( ! $ fallbackToDefault ) { throw new UserMessageException ( t ( 'The server time zone has not been defined.' ) ) ; } $ timeZoneId = @ date_default_timezone_get ( ) ? : 'UTC' ; } try { $ result = new DateTimeZone ( $ timeZoneId ) ; } catch ( Exception $ x ) { $ result = null ; } if ( $ result === null ) { throw new UserMessageException ( t ( 'Invalid server time zone: %s' , $ timeZoneId ) ) ; } return $ result ; }
Get the server time zone instance.

@param bool $fallbackToDefault Fallback to the default one if the time zone is not defined?

@throws UserMessageException

@return DateTimeZone
Get the server time zone instance .