diff --git a/src/main/java/se/citerus/dddsample/interfaces/booking/web/RouteAssignmentCommand.java b/src/main/java/se/citerus/dddsample/interfaces/booking/web/RouteAssignmentCommand.java index 3774d225a..8e5c0b371 100644 --- a/src/main/java/se/citerus/dddsample/interfaces/booking/web/RouteAssignmentCommand.java +++ b/src/main/java/se/citerus/dddsample/interfaces/booking/web/RouteAssignmentCommand.java @@ -1,6 +1,8 @@ package se.citerus.dddsample.interfaces.booking.web; import java.time.Instant; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.List; @@ -60,16 +62,16 @@ public Instant getFromDate() { return fromDate; } - public void setFromDate(Instant fromDate) { - this.fromDate = fromDate; + public void setFromDate(String fromDate) { + this.fromDate = ZonedDateTime.parse(fromDate).toInstant(); } public Instant getToDate() { return toDate; } - public void setToDate(Instant toDate) { - this.toDate = toDate; + public void setToDate(String toDate) { + this.toDate = ZonedDateTime.parse(toDate).toInstant(); } } } diff --git a/src/main/resources/templates/admin/selectItinerary.html b/src/main/resources/templates/admin/selectItinerary.html index a50648d09..14ed9b93b 100644 --- a/src/main/resources/templates/admin/selectItinerary.html +++ b/src/main/resources/templates/admin/selectItinerary.html @@ -44,9 +44,9 @@ + th:value="${#dates.formatISO(leg.loadTime)}"/> + th:value="${#dates.formatISO(leg.unloadTime)}"/>