diff --git a/src/resources/personalized-content/src/java/org/wyona/yanel/impl/resources/boost/PersonalizedContentResource.java b/src/resources/personalized-content/src/java/org/wyona/yanel/impl/resources/boost/PersonalizedContentResource.java index 4e5db4fc2..4e8cd569f 100644 --- a/src/resources/personalized-content/src/java/org/wyona/yanel/impl/resources/boost/PersonalizedContentResource.java +++ b/src/resources/personalized-content/src/java/org/wyona/yanel/impl/resources/boost/PersonalizedContentResource.java @@ -121,7 +121,8 @@ protected InputStream getContentXML(String viewId) throws Exception { break; } - for(Node node : nodes) { + for(int i = nodes.length - 1; i >= 0; i++) { + Node node = nodes[i]; Element res_node = doc.createElementNS(NAMESPACE, "result"); resultsEl.appendChild(res_node); @@ -134,7 +135,8 @@ protected InputStream getContentXML(String viewId) throws Exception { res_node.appendChild(res_name); Element res_time = doc.createElementNS(NAMESPACE, "last-modified"); - res_time.appendChild(doc.createTextNode(Long.toString(node.getLastModified()))); + res_time.setAttribute("epoch", Long.toString(node.getLastModified())); + res_time.appendChild(doc.createTextNode(new java.util.Date(node.getLastModified()).toString())); res_node.appendChild(res_time); } }