Skip to content

Commit

Permalink
Merge pull request #269 from bcgov/develop/alex-GRAD2-2799
Browse files Browse the repository at this point in the history
Develop/alex grad2 2799
  • Loading branch information
arybakov-cgi authored Jun 26, 2024
2 parents 87482f3 + ab360fc commit 350feca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public LocalDate deserialize(JsonParser jsonParser, DeserializationContext deser
if(slashCount > 0) {
formatter = DateTimeFormatter.ofPattern(SECOND_DEFAULT_DATE_FORMAT);
}
return LocalDate.parse(dateAsString, formatter);
return LocalDate.parse(dateAsString, formatter).with(TemporalAdjusters.lastDayOfMonth());
} else if(jsonParser.hasToken(JsonToken.VALUE_NUMBER_INT)) {
long timestamp = jsonParser.getValueAsLong();
return LocalDate.ofInstant(Instant.ofEpochMilli(timestamp), ZoneId.systemDefault());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public LocalDateTime deserialize(JsonParser jsonParser, DeserializationContext d
if(slashCount > 0) {
formatter = DateTimeFormatter.ofPattern(SECOND_DEFAULT_DATE_FORMAT);
}
return LocalDateTime.parse(dateAsString, formatter);
return LocalDateTime.parse(dateAsString, formatter).with(TemporalAdjusters.lastDayOfMonth());
} else if(jsonParser.hasToken(JsonToken.VALUE_NUMBER_INT)) {
long timestamp = jsonParser.getValueAsLong();
return LocalDateTime.ofInstant(Instant.ofEpochMilli(timestamp), ZoneId.systemDefault());
Expand Down

0 comments on commit 350feca

Please sign in to comment.