From 3e81ecf98f9353b3aa76d7c8fc22a0499efd8d57 Mon Sep 17 00:00:00 2001 From: ulrich <undisclosed> Date: Sun, 01 Apr 2018 13:50:56 +0000 Subject: [PATCH] Veroeffentlichungsdatum eines Feeds auf das Datum des neuesten Beitrags gesetzt --- src/de/uhilger/wbx/web/FeedServlet.java | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/de/uhilger/wbx/web/FeedServlet.java b/src/de/uhilger/wbx/web/FeedServlet.java index fcab375..c23e6cd 100644 --- a/src/de/uhilger/wbx/web/FeedServlet.java +++ b/src/de/uhilger/wbx/web/FeedServlet.java @@ -212,13 +212,19 @@ public void writeFeed(String feedTitel, String beschr, ServletOutputStream s, List beitraege, String basis, String pfad, String contextPath) { + + long newest = -1; String copyright = getJNDIParameter(WBX_FEED_COPYRIGHT); String domain = getJNDIParameter(WBX_FEED_DOMAIN); String title = feedTitel; String description = beschr; String language = "de"; String link = domain; + + newest = ((File) beitraege.get(0)).lastModified(); + Calendar cal = new GregorianCalendar(); + cal.setTime(new Date(newest)); Date creationDate = cal.getTime(); SimpleDateFormat date_format = new SimpleDateFormat( "EEE', 'dd' 'MMM' 'yyyy' 'HH:mm:ss' 'Z", Locale.US); -- Gitblit v1.9.3