Author: hansbak
Date: Fri Nov 23 22:43:50 2007
New Revision: 597818
URL:
http://svn.apache.org/viewvc?rev=597818&view=revLog:
make the form input field:<date-time type=date/> working
Modified:
ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/ObjectType.java
Modified: ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/ObjectType.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/ObjectType.java?rev=597818&r1=597817&r2=597818&view=diff==============================================================================
--- ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/ObjectType.java (original)
+++ ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/ObjectType.java Fri Nov 23 22:43:50 2007
@@ -574,6 +574,10 @@
DateFormat df = null;
if (format == null || format.length() == 0) {
df = UtilDateTime.toDateTimeFormat(UtilDateTime.DATE_TIME_FORMAT, timeZone, null);
+ // if time is missing add zeros
+ if (str.length() > 0 && !str.contains(":")) {
+ str = str + " 00:00:00.00";
+ }
// hack to mimic Timestamp.valueOf() method
if (str.length() > 0 && !str.contains(".")) {
str = str + ".0";