Author: jaz
Date: Fri Jun 8 11:21:12 2007
New Revision: 545578
URL:
http://svn.apache.org/viewvc?view=rev&rev=545578Log:
added toGMTTimestampString() method from Anil Patel
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?view=diff&rev=545578&r1=545577&r2=545578==============================================================================
--- 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 Jun 8 11:21:12 2007
@@ -19,6 +19,7 @@
package org.ofbiz.base.util;
import java.sql.Timestamp;
+import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@@ -26,6 +27,7 @@
import java.util.Date;
import java.util.Locale;
import java.util.Map;
+import java.util.TimeZone;
/**
* Utility class for handling java.util.Date, the java.sql data/time classes and related
@@ -695,6 +697,13 @@
}
}
+ public static String toGMTTimeStampString(Timestamp timestamp) {
+ DateFormat df = DateFormat.getDateTimeInstance();
+ df.setTimeZone(TimeZone.getTimeZone("GMT"));
+ return df.format(timestamp);
+ }
+
+
/**
* Makes a Timestamp for the beginning of the month
*