Fix localdate

This commit is contained in:
2024-04-11 17:04:09 +02:00
parent af40f38ca3
commit a369bf0297
2 changed files with 6 additions and 1 deletions

View File

@@ -58,6 +58,11 @@ public class UtilityLocalDate {
.toLocalDateTime();
}
public static LocalDateTime localDateTimeFromLocalDate(LocalDate dateToConvert) {
return dateToConvert
.atStartOfDay();
}
public static LocalDate timeToLocalDate(long time, @Nullable String timezone) {
return Instant.ofEpochSecond(time)
.atZone(timezone == null ? currentZone : ZoneId.of(timezone))

View File

@@ -602,7 +602,7 @@ public class SmartLogisticService {
dataVers = sdf.format(collo.getDataVers());
String keyCol = "<GESTIONE>" + collo.getGestione() + "</GESTIONE>" +
"<DATA_COLLO>" + CommonConstants.DATETIME_YMD_DASHED_FORMATTER.format(collo.getDataCollo()) + "</DATA_COLLO>" +
"<DATA_COLLO>" + CommonConstants.DATETIME_YMD_DASHED_FORMATTER.format(UtilityLocalDate.localDateTimeFromLocalDate(collo.getDataCollo())) + "</DATA_COLLO>" +
"<NUM_COLLO>" + collo.getNumCollo() + "</NUM_COLLO>" +
"<SER_COLLO>" + collo.getSerCollo() + "</SER_COLLO>" +
"<DATA_ORD>" + dataOrd + "</DATA_ORD>" +