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;
    }