diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WDatetimeEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WDatetimeEditor.java index d45f3ef4b0..4dcb8e22a5 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WDatetimeEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WDatetimeEditor.java @@ -13,6 +13,7 @@ package org.adempiere.webui.editor; import java.sql.Timestamp; +import java.time.LocalDateTime; import java.time.ZoneId; import java.util.Date; @@ -143,7 +144,7 @@ public class WDatetimeEditor extends WEditor implements ContextMenuListener { // Elaine 2008/07/25 if(getComponent().getValue() == null) return null; - return Timestamp.valueOf(getComponent().getDatebox().getValue().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime()); + return Timestamp.valueOf(getComponent().getValue().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime()); // } @@ -157,7 +158,9 @@ public class WDatetimeEditor extends WEditor implements ContextMenuListener } else if (value instanceof Timestamp) { - getComponent().getDatebox().setValueInLocalDateTime(((Timestamp)value).toLocalDateTime()); + LocalDateTime localTime =((Timestamp)value).toLocalDateTime(); + getComponent().getDatebox().setValueInLocalDateTime(localTime); + getComponent().getTimebox().setValueInLocalDateTime(localTime); oldValue = (Timestamp)value; } else