Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java =================================================================== diff -u -r40f884f2618cf022c3cb27aaa6e7e5cc04a96ae1 -r968b9add2b68d12cc29372bcb709460a67556af4 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java (.../QaLearningAction.java) (revision 40f884f2618cf022c3cb27aaa6e7e5cc04a96ae1) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java (.../QaLearningAction.java) (revision 968b9add2b68d12cc29372bcb709460a67556af4) @@ -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())); }