I used it on a system which is set to GMT and requires dates be displayed in the customer facing in the customer's timezone. The timezone is read as an offset (in javascript) and then adjusted on the fly as needed. There is no TimeZone object available, all we know is how many minutes off GMT.
Andrew On Oct 25, 2007, at 6:24 PM, Adrian Crum wrote:
From: Adrian Crum <[EMAIL PROTECTED]> Date: October 19, 2007 3:59:54 PM EDT To: [email protected], [EMAIL PROTECTED]Subject: Re: svn commit: r586582 - /ofbiz/trunk/framework/base/src/ base/org/ofbiz/base/util/UtilDateTime.javaReply-To: [email protected]Why would you want to do that? The calling method should have a TimeZone and Locale object available. Any code that uses this method will get unpredictable results.-Adrian [EMAIL PROTECTED] wrote:Author: jaz Date: Fri Oct 19 12:09:27 2007 New Revision: 586582 URL: http://svn.apache.org/viewvc?rev=586582&view=rev Log: added adjustTimestamp method which doesn't require timezone or locale 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=586582&r1=586581&r2=586582&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 12:09:27 2007@@ -771,6 +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 getDayStart(Timestamp stamp, TimeZone timeZone, Locale locale) {return getDayStart(stamp, 0, timeZone, locale); }
smime.p7s
Description: S/MIME cryptographic signature
