Again, I am AGAINST these changes and I would like to see them reverted.
Over the past few months we have been trying to get OFBiz to support user selected locales and time
zones. These commits are a giant step BACKWARDS in that effort.
TimeZone and Locale objects should be REQUIRED for date/time calculations, not
optional.
-Adrian
[EMAIL PROTECTED] wrote:
Author: jaz
Date: Fri Oct 19 13:28:21 2007
New Revision: 586597
URL: http://svn.apache.org/viewvc?rev=586597&view=rev
Log:
changed method so it can be called through FTL static calls
Modified:
ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilDateTime.java
Modified:
ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilDateTime.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilDateTime.java?rev=586597&r1=586596&r2=586597&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilDateTime.java
(original)
+++ ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilDateTime.java
Fri Oct 19 13:28:21 2007
@@ -771,8 +771,10 @@
return new Timestamp(tempCal.getTimeInMillis());
}
- public static Timestamp adjustTimestamp(Timestamp stamp, int adjType, int adjQuantity) {
- return adjustTimestamp(stamp, adjType, adjQuantity, null, null);
+ public static Timestamp adjustTimestamp(Timestamp stamp, Integer adjType,
Integer adjQuantity) {
+ Calendar tempCal = toCalendar(stamp);
+ tempCal.add(adjType, adjQuantity);
+ return new Timestamp(tempCal.getTimeInMillis());
}
public static Timestamp getDayStart(Timestamp stamp, TimeZone timeZone, Locale locale) {