Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java,v diff -u -r1.53.2.21 -r1.53.2.22 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java 25 Jun 2016 02:40:56 -0000 1.53.2.21 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java 25 Jun 2016 02:59:48 -0000 1.53.2.22 @@ -1096,8 +1096,6 @@ responcedata.put(AttributeNames.ATTR_COUNT_RATED_ITEMS, countRatedQuestions); } - DateFormat dateFormatter = new SimpleDateFormat(DateUtil.PRETTY_FORMAT); - dateFormatter.setTimeZone(userTimeZone); // setting date format to ISO8601 for jquery.timeago DateFormat dateFormatterTimeAgo = new SimpleDateFormat(DateUtil.ISO8601_FORMAT); dateFormatterTimeAgo.setTimeZone(TimeZone.getTimeZone("GMT")); @@ -1120,7 +1118,8 @@ // as trying to convert dates runs into tz issues - any Date object created is still // in the server time zone. Date attemptTime = response.getAttemptTime(); - responseRow.put("attemptTime", dateFormatter.format(attemptTime)); + ; + responseRow.put("attemptTime", DateUtil.convertToStringForJSON(attemptTime, request.getLocale())); responseRow.put("timeAgo", dateFormatterTimeAgo.format(attemptTime)); if (isAllowRateAnswers) { @@ -1166,7 +1165,7 @@ // format attemptTime Date postedDate = commentDto.getPostedDate(); postedDate = DateUtil.convertToTimeZoneFromDefault(userTimeZone, postedDate); - comment.put("postedDate", dateFormatter.format(postedDate)); + comment.put("postedDate", DateUtil.convertToStringForJSON(postedDate, request.getLocale())); comment.put("userFullName", StringEscapeUtils.escapeCsv(commentDto.getUserFullName())); }