taskain7 commented on code in PR #3352:
URL: https://github.com/apache/fineract/pull/3352#discussion_r1281557100
##########
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/JsonParserHelper.java:
##########
@@ -518,17 +519,19 @@ public static LocalDate convertFrom(final String
dateAsString, final String para
return convertDateTimeFrom(dateAsString, parameterName, dateFormat,
clientApplicationLocale).toLocalDate();
}
- public static LocalDateTime convertDateTimeFrom(final String
dateTimeAsString, final String parameterName, final String dateTimeFormat,
+ public static LocalDateTime convertDateTimeFrom(final String
dateTimeAsString, final String parameterName, String dateTimeFormat,
final Locale clientApplicationLocale) {
validateDateFormatAndLocale(parameterName, dateTimeFormat,
clientApplicationLocale);
LocalDateTime eventLocalDateTime = null;
+ dateTimeFormat = dateTimeFormat.replace("y", "u");
if (StringUtils.isNotBlank(dateTimeAsString)) {
try {
DateTimeFormatter formatter = new
DateTimeFormatterBuilder().parseCaseInsensitive().parseLenient()
Review Comment:
I think we shouldn't, parsing could remain lenient, it's still useful in
cases like "9 September 2022" will be parsed to "09 September 2022"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]