X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FGetTimesAjaxPage.java;h=f6bc05d6e0e27842647a01031e445e6920a18c4d;hp=cec9967f5d9e21328d4777268cf7efd3f0c8626c;hb=77e1ba0c544701f3291f010808dd6e9c3e248054;hpb=54e35873a9660bc51aae7cdb4c1e7d399e50986b 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 cec9967..f6bc05d 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/GetTimesAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/GetTimesAjaxPage.java @@ -1,5 +1,5 @@ /* - * Sone - GetTimesAjaxPage.java - Copyright © 2010–2011 David Roden + * Sone - GetTimesAjaxPage.java - Copyright © 2010–2012 David Roden * * 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 @@ -66,7 +66,9 @@ public class GetTimesAjaxPage extends JsonPage { Time time = getTime(post.getTime()); postTime.put("timeText", time.getText()); postTime.put("refreshTime", time.getRefresh() / Time.SECOND); - postTime.put("tooltip", dateFormat.format(new Date(post.getTime()))); + synchronized (dateFormat) { + postTime.put("tooltip", dateFormat.format(new Date(post.getTime()))); + } postTimes.put(id, postTime); } } @@ -83,7 +85,9 @@ public class GetTimesAjaxPage extends JsonPage { 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()))); + synchronized (dateFormat) { + replyTime.put("tooltip", dateFormat.format(new Date(reply.getTime()))); + } replyTimes.put(id, replyTime); } }