From 37c68e9d52f9a9a8f233a7dabb84b2077b86e2e6 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Mon, 19 Sep 2022 08:36:04 +0200 Subject: [PATCH] fix #805 --- resources/desktop/com.github.rssguard.appdata.xml | 2 +- src/librssguard/core/message.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/resources/desktop/com.github.rssguard.appdata.xml b/resources/desktop/com.github.rssguard.appdata.xml index ac91dc85d..c55146eea 100644 --- a/resources/desktop/com.github.rssguard.appdata.xml +++ b/resources/desktop/com.github.rssguard.appdata.xml @@ -24,7 +24,7 @@ https://github.com/sponsors/martinrotter - + none diff --git a/src/librssguard/core/message.cpp b/src/librssguard/core/message.cpp index f60db162e..750639c1d 100644 --- a/src/librssguard/core/message.cpp +++ b/src/librssguard/core/message.cpp @@ -98,10 +98,9 @@ void Message::sanitize(const Feed* feed, bool fix_future_datetimes) { // Fix datetimes in future. if ((fix_future_datetimes && m_createdFromFeed && m_created.toUTC() > QDateTime::currentDateTimeUtc()) || - (m_createdFromFeed && !m_created.isValid())) { + (m_createdFromFeed && (!m_created.isValid() || m_created.toSecsSinceEpoch() < 0))) { qWarningNN << LOGSEC_CORE << "Fixing date of article" << QUOTE_W_SPACE(m_title) << "from invalid date/time" << QUOTE_W_SPACE_DOT(m_created); - m_createdFromFeed = false; m_created = QDateTime::currentDateTimeUtc(); }