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

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

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

Adrian Crum
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

[hidden email] 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);
>      }
>
>
>