protected function determineTimezone(DateLexerResult $parts, TimeOffset $offset, DateTimeZone $inputTz = null)
    {
        // e   Timezone identifier (added in PHP 5.1.0)    Examples: UTC, GMT, Atlantic/Azores
        // O   Difference to Greenwich time (GMT) in hours Example: +0200
        // P   Difference to Greenwich time (GMT) with colon between hours and minutes (added in PHP 5.1.3)    Example: +02:00
        if (null !== $tz = $parts->getFirst('e', 'O', 'P')) {
            return new DateTimeZone($tz);
        }

        // Create a fixed timezone matching the offset.
        if (null !== $tz = $offset->buildTimeZone()) {
            return $tz;
        }

        if (null !== $inputTz) {
            return $inputTz;
        }

        // Fallback.
        return new DateTimeZone(date_default_timezone_get());
    }