diff options
Diffstat (limited to 'juick-www/src/main/java/com/juick/www')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/RSS.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/juick-www/src/main/java/com/juick/www/RSS.java b/juick-www/src/main/java/com/juick/www/RSS.java index a343d13b..91ba9380 100644 --- a/juick-www/src/main/java/com/juick/www/RSS.java +++ b/juick-www/src/main/java/com/juick/www/RSS.java @@ -19,6 +19,7 @@ package com.juick.www; import com.juick.Message; import com.juick.server.MessagesQueries; +import com.juick.util.DateFormattersHolder; import com.juick.util.MessageUtils; import com.mitchellbosecke.pebble.error.PebbleException; import com.mitchellbosecke.pebble.template.PebbleTemplate; @@ -28,7 +29,6 @@ import javax.servlet.ServletException; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.PrintWriter; -import java.text.SimpleDateFormat; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -39,8 +39,6 @@ import java.util.Map; */ public class RSS { - private static final SimpleDateFormat sdfRSS = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z"); - protected void doGet(JdbcTemplate sql, HttpServletResponse response, int uid) throws ServletException, IOException, PebbleException { List<Integer> mids = MessagesQueries.getUserBlog(sql, uid, 0, 0); if (mids.isEmpty()) { @@ -58,7 +56,7 @@ public class RSS { Map<String, Object> context = new HashMap<>(); context.put("user", msgs.stream().findFirst().get().getUser()); context.put("msgs", msgs); - context.put("sdfRSS", sdfRSS); + context.put("sdfRSS", DateFormattersHolder.getRssFormatterInstance()); template.evaluate(out, context); } } |