svn commit: r702495 - /ofbiz/trunk/framework/base/src/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
|

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

adrianc
Author: adrianc
Date: Tue Oct  7 07:42:46 2008
New Revision: 702495

URL: http://svn.apache.org/viewvc?rev=702495&view=rev
Log:
UtilDateTime.toCalendar(...) now accepts Date objects.

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=702495&r1=702494&r2=702495&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 Oct  7 07:42:46 2008
@@ -751,16 +751,16 @@
      * Returns a Calendar object initialized to the specified date/time, time zone,
      * and locale.
      *
-     * @param stamp date/time to use
+     * @param date date/time to use
      * @param timeZone
      * @param locale
      * @return Calendar object
      * @see java.util.Calendar
      */
-    public static Calendar toCalendar(Timestamp stamp, TimeZone timeZone, Locale locale) {
+    public static Calendar toCalendar(Date date, TimeZone timeZone, Locale locale) {
         Calendar cal = Calendar.getInstance(timeZone, locale);
-        if (stamp != null) {
-            cal.setTimeInMillis(stamp.getTime());
+        if (date != null) {
+            cal.setTime(date);
         }
         return cal;
     }