From 98535f3438295050b13f1c59f9be4135dff1d9d5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 12 Sep 2011 14:50:01 +0200 Subject: [PATCH] Use correct time to get formatted time. --- src/main/java/net/pterodactylus/sone/web/ajax/GetTimesAjaxPage.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/GetTimesAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/GetTimesAjaxPage.java index 31ec399..f03e6e4 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/GetTimesAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/GetTimesAjaxPage.java @@ -52,7 +52,6 @@ public class GetTimesAjaxPage extends JsonPage { */ @Override protected JsonObject createJsonObject(Request request) { - long now = System.currentTimeMillis(); String allIds = request.getHttpRequest().getParam("posts"); JsonObject postTimes = new JsonObject(); if (allIds.length() > 0) { @@ -79,9 +78,8 @@ public class GetTimesAjaxPage extends JsonPage { if (reply == null) { continue; } - long age = now - reply.getTime(); JsonObject replyTime = new JsonObject(); - Time time = getTime(age); + Time time = getTime(reply.getTime()); replyTime.put("timeText", time.getText()); replyTime.put("refreshTime", time.getRefresh() / Time.SECOND); replyTime.put("tooltip", dateFormat.format(new Date(reply.getTime()))); -- 2.7.4