DateTimeFormatter を使用して日付文字列を解析しようとしています。以下の例外が発生します。
間違った日付形式 10.10.2020 12:00:00 java.time.format.DateTimeParseException: テキスト '10.10.2020 12:00:00' をインデックス 2 で解析できませんでした
String date="10.10.2020 12:00:00";
String dateTimeFormat = "MM/dd/yyyy HH:mm:ss a";
String exportTimeZone = "UTC";
DateTimeFormatter format = DateTimeFormatter.ofPattern(dateTimeFormat);
LocalDateTime impDateTime = LocalDateTime.parse(StringUtils.trim(date), format);
ZonedDateTime dateInUtc = ZonedDateTime.ofInstant(impDateTime.atZone(ZoneId.of(exportTimeZone)).toInstant(), ZoneId.systemDefault());
return format.format(dateInUtc);
何か助けていただければ幸いです。