You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2009/02/10 11:47:11 UTC

svn commit: r742933 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilDateTime.java

Author: jleroux
Date: Tue Feb 10 10:47:01 2009
New Revision: 742933

URL: http://svn.apache.org/viewvc?rev=742933&view=rev
Log:
A patch from Marco Ruocco "Error using the UtilDateTime.addDaysToTimestamp method" (https://issues.apache.org/jira/browse/OFBIZ-2177) - OFBIZ-2177

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilDateTime.java

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilDateTime.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilDateTime.java?rev=742933&r1=742932&r2=742933&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilDateTime.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilDateTime.java Tue Feb 10 10:47:01 2009
@@ -79,11 +79,11 @@
     }
 
     public static Timestamp addDaysToTimestamp(Timestamp start, int days) {
-        return new Timestamp(start.getTime() + (24*60*60*1000*days));
+        return new Timestamp(start.getTime() + (24L*60L*60L*1000L*days));
     }
 
     public static Timestamp addDaysToTimestamp(Timestamp start, Double days) {
-        return new Timestamp(start.getTime() + ((int) (24*60*60*1000*days)));
+        return new Timestamp(start.getTime() + ((int) (24L*60L*60L*1000L*days)));
     }
 
     public static double getInterval(Timestamp from, Timestamp thru) {