*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
String allIds = request.getHttpRequest().getParam("posts");
JsonObject postTimes = new JsonObject();
if (allIds.length() > 0) {
String allIds = request.getHttpRequest().getParam("posts");
JsonObject postTimes = new JsonObject();
if (allIds.length() > 0) {
postTime.put("timeText", time.getText());
postTime.put("refreshTime", time.getRefresh() / Time.SECOND);
postTime.put("tooltip", dateFormat.format(new Date(post.getTime())));
postTime.put("timeText", time.getText());
postTime.put("refreshTime", time.getRefresh() / Time.SECOND);
postTime.put("tooltip", dateFormat.format(new Date(post.getTime())));
if (allIds.length() > 0) {
String[] ids = allIds.split(",");
for (String id : ids) {
if (allIds.length() > 0) {
String[] ids = allIds.split(",");
for (String id : ids) {
replyTime.put("timeText", time.getText());
replyTime.put("refreshTime", time.getRefresh() / Time.SECOND);
replyTime.put("tooltip", dateFormat.format(new Date(reply.getTime())));
replyTime.put("timeText", time.getText());
replyTime.put("refreshTime", time.getRefresh() / Time.SECOND);
replyTime.put("tooltip", dateFormat.format(new Date(reply.getTime())));
- private Time getTime(long age) {
- return getTime(webInterface, age);
+ private Time getTime(long time) {
+ return getTime(webInterface, time);
- public static Time getTime(WebInterface webInterface, long age) {
+ public static Time getTime(WebInterface webInterface, long time) {
+ if (time == 0) {
+ return new Time(webInterface.getL10n().getString("View.Sone.Text.UnknownDate"), 12 * Time.HOUR);
+ }
+ long age = System.currentTimeMillis() - time;