Index: lams_common/src/java/org/lamsfoundation/lams/util/DateUtil.java =================================================================== diff -u -rf8f92ec5054f175535844294c99501059fd60ed1 -r858d0c85e5943e046c9381ba4de20c24b5008d70 --- lams_common/src/java/org/lamsfoundation/lams/util/DateUtil.java (.../DateUtil.java) (revision f8f92ec5054f175535844294c99501059fd60ed1) +++ lams_common/src/java/org/lamsfoundation/lams/util/DateUtil.java (.../DateUtil.java) (revision 858d0c85e5943e046c9381ba4de20c24b5008d70) @@ -55,6 +55,8 @@ public static final String ISO8601_FORMAT = "yyyy-MM-dd'T'HH:mmZ"; public static final String PRETTY_FORMAT = "d MMMM yyyy h:mm:ss a"; + private static final FastDateFormat dateFormatterTimeAgo = FastDateFormat.getInstance(DateUtil.ISO8601_FORMAT, TimeZone.getTimeZone("GMT"), null); + /** * Convert your local time to Universal Time Coordinator. TODO conversion is not working properly. The returned Date * object still contain server local timezone rather than GMT time zone. @@ -264,7 +266,6 @@ * Convert a date to the ISO08601 format needed for Timeago. Used to return dates through JSON. */ public static String convertToStringForTimeagoJSON(Date value) { - FastDateFormat dateFormatterTimeAgo = FastDateFormat.getInstance(DateUtil.ISO8601_FORMAT, TimeZone.getTimeZone("GMT"), null); return dateFormatterTimeAgo.format(value); }