Skip to content

Commit

Permalink
Fix date parse for yyyy-MM-ddTHH:mm:ss pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
arybakov-cgi committed Jul 24, 2023
1 parent 09f8bc1 commit 49c3c01
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public LocalDateTime deserialize(JsonParser jsonParser, DeserializationContext d
formatter = DateTimeFormatter.ofPattern("yyyy/MM/ddTHH:mm:ss.000+00:00");
return LocalDateTime.parse(dateAsString, formatter);
} else if(StringUtils.isNotBlank(dateAsString) && dateAsString.length() > 10 && dateAsString.contains("-") && dateAsString.contains("T")) {
formatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
formatter = DateTimeFormatter.ofPattern("yyyy-MM-ddTHH:mm:ss");
return LocalDateTime.parse(dateAsString, formatter);
} else if(StringUtils.isNotBlank(dateAsString)) {
return LocalDateTime.parse(dateAsString, formatter);
Expand Down

0 comments on commit 49c3c01

Please sign in to comment.