svn commit: r732653 - /ofbiz/trunk/framework/common/src/org/ofbiz/common/olap/CommonDimensionServices.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r732653 - /ofbiz/trunk/framework/common/src/org/ofbiz/common/olap/CommonDimensionServices.java

jleroux@apache.org
Author: jleroux
Date: Thu Jan  8 01:09:32 2009
New Revision: 732653

URL: http://svn.apache.org/viewvc?rev=732653&view=rev
Log:
A patch from Erwan de Ferrières  "Change date format in BI component when calling loadDateDimension"  '(https://issues.apache.org/jira/browse/OFBIZ-2113) - OFBIZ-2113

Modified:
    ofbiz/trunk/framework/common/src/org/ofbiz/common/olap/CommonDimensionServices.java

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/olap/CommonDimensionServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/olap/CommonDimensionServices.java?rev=732653&r1=732652&r2=732653&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/olap/CommonDimensionServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/olap/CommonDimensionServices.java Thu Jan  8 01:09:32 2009
@@ -82,7 +82,7 @@
         calendar.set(Calendar.MINUTE, 0);
         calendar.set(Calendar.SECOND, 0);
         calendar.set(Calendar.MILLISECOND, 0);
-        Date currentDate = calendar.getTime();
+        java.sql.Date currentDate = new java.sql.Date(calendar.getTimeInMillis());
         while (currentDate.compareTo(thruDate) <= 0) {
             GenericValue dateValue = null;
             try {
@@ -121,7 +121,7 @@
                 return ServiceUtil.returnError(gee.getMessage());
             }
             calendar.add(Calendar.DATE, 1);
-            currentDate = calendar.getTime();
+            currentDate = new java.sql.Date(calendar.getTimeInMillis());
         }
         return ServiceUtil.returnSuccess();
     }