protected static String normalize(String text) {

        text = text.toUpperCase(Locale.US);

        //strip out commas
        text = text.replaceAll(",", "");

        //1) strip off extra stuff after +0800, e.g. "Mon, 9 May 2016 7:32:00 UTC+0600 (BST)",
        //2) insert a colon btwn hrs and minutes to avoid a difference in behavior
        // between jdk 8 and jdk 11+17
        Matcher matcher = OFFSET_PATTERN.matcher(text);
        while (matcher.find()) {
            if (matcher.group(1) != null) {
                text = text.substring(0, matcher.start());
                text += matcher.group(1) + StringUtils.leftPad(matcher.group(2), 2, '0') + ":" +
                        matcher.group(3);
                break;
            }
        }

        matcher = LOCALIZED_OFFSET_PATTERN.matcher(text);
        if (matcher.find()) {
            text = buildLocalizedOffset(matcher, text);
        }

        matcher = AM_PM.matcher(text);
        if (matcher.find()) {
            text = matcher.replaceFirst("$1 $2");
        }
        //The rfc_lenient parser had a problem parsing dates
        //with days of week missing and a timezone: 9 May 2016 01:32:00 UTC
        //The day of week is not used in the resolvers, so we may as well throw
        //out that info
        matcher = DAYS_OF_WEEK.matcher(text);
        if (matcher.find()) {
            text = matcher.replaceAll(" ");
        }
        //16 May 2016 at 09:30:32  GMT+1
        text = text.replaceAll("(?i) at ", " ");
        //just cause
        text = text.replaceAll("\\s+", " ").trim();
        return text;
    }
Dates in emails are a mess.  There are at least two major date related bugs in JDK 8.
And, I've found differing behavior, bug or not, between JDK 8 and JDK 11/17.
This class does its best to parse date strings.  It does have a US-based date bias.
Please open a ticket to fix this as needed.  We can also add overrides via the parser config
to manage customization of date formats.

This code does not spark joy especially given the diffs in behavior between jdk versions.

At some point, we should probably try joda or, heaven forfend, a pile of regexes.
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-mail-commons/src/main/java/org/apache/tika/parser/mailcommons/MailDateParser.java