A quick reminder to the rest of the community: UtilDateTime methods that
perform millisecond arithmetic should not be used.
-Adrian
On 9/17/2010 3:40 AM, [email protected] wrote:
Author: ashish
Date: Fri Sep 17 10:40:20 2010
New Revision: 998061
URL: http://svn.apache.org/viewvc?rev=998061&view=rev
Log:
Correcting the condition. Thanks Akash for the contribution.
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=998061&r1=998060&r2=998061&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 Fri
Sep 17 10:40:20 2010
@@ -76,7 +76,7 @@ public class UtilDateTime {
}
public static int getIntervalInDays(Timestamp from, Timestamp thru) {
- return thru != null ? (int) (thru.getTime() - from.getTime()) /
(24*60*60*1000) : 0;
+ return thru != null ? (int) ((thru.getTime() - from.getTime()) /
(24*60*60*1000)) : 0;
}
public static Timestamp addDaysToTimestamp(Timestamp start, int days) {