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())));
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;