public static Date parseDateLenient(String text) {
        if (text == null) {
            return null;
        }
        String normalized = normalize(text);
        for (DateTimeFormatter dateTimeFormatter : DATE_TIME_FORMATTERS) {
            try {
                ZonedDateTime zonedDateTime = ZonedDateTime.parse(normalized, dateTimeFormatter);
                return Date.from(Instant.from(zonedDateTime));
            } catch (SecurityException e) {
                throw e;
            } catch (DateTimeParseException e) {

                //There's a bug in java 8 that if we include .withZone in the DateTimeFormatter,
                //that will override the offset/timezone id even if it included
                // in the original string.  This is fixed in later versions of Java.
                // Once we move to Java 11, we can get rid of this. Can't make this up...
                try {
                    LocalDateTime localDateTime = LocalDateTime.parse(normalized, dateTimeFormatter);
                    return Date.from(Instant.from(localDateTime.atOffset(UTC)));
                } catch (SecurityException e2) {
                    throw e2;
                } catch (Exception e2) {
                    //swallow
                }
            } catch (Exception e) {
                //can get StringIndexOutOfBoundsException because of a bug in java 8
                //ignore
            }
        }

        for (DateTimeFormatter dateFormatter : DATE_FORMATTERS) {
            try {
                TemporalAccessor temporalAccessor = dateFormatter.parse(normalized);
                ZonedDateTime localDate = LocalDate.from(temporalAccessor)
                        .atStartOfDay()
                        .atZone(MIDDAY.toZoneId());
                return Date.from(Instant.from(localDate));
            } catch (SecurityException e) {
                throw e;
            } catch (Exception e) {
                //ignore
            }
        }
        return null;
    }
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