Use original timestamp for RSS posts, if available.

This commit is contained in:
akwizgran
2017-04-13 14:43:43 +01:00
parent 46920f3bce
commit 1b48d661e8

View File

@@ -467,7 +467,11 @@ class FeedManagerImpl implements FeedManager, Client, EventListener,
// get other information for post
GroupId groupId = feed.getBlogId();
long time = clock.currentTimeMillis();
long time;
Date date = entry.getUpdatedDate();
if (date == null) date = entry.getPublishedDate();
if (date == null) time = clock.currentTimeMillis();
else time = date.getTime();
String body = getPostBody(b.toString());
try {
// create and store post