fix wrong dates in one feed
This commit is contained in:
parent
51ddab9386
commit
47714ac590
2 changed files with 10 additions and 5 deletions
|
@ -141,11 +141,12 @@ QDateTime TextFactory::parseDateTime(qint64 milis_from_epoch) {
|
||||||
|
|
||||||
QStringList TextFactory::dateTimePatterns() {
|
QStringList TextFactory::dateTimePatterns() {
|
||||||
return QStringList() << QSL("yyyy-MM-ddTHH:mm:ss") << QSL("MMM dd yyyy hh:mm:ss") << QSL("MMM d yyyy hh:mm:ss")
|
return QStringList() << QSL("yyyy-MM-ddTHH:mm:ss") << QSL("MMM dd yyyy hh:mm:ss") << QSL("MMM d yyyy hh:mm:ss")
|
||||||
<< QSL("ddd, dd MMM yyyy HH:mm:ss") << QSL("ddd, d MMM yyyy HH:mm:ss")
|
<< QSL("ddd, dd MMM yyyy HH:mm:ss") << QSL("ddd, dd MMM yyyy HH:mm")
|
||||||
<< QSL("dd MMM yyyy hh:mm:ss") << QSL("dd MMM yyyy") << QSL("yyyy-MM-dd HH:mm:ss.z")
|
<< QSL("ddd, d MMM yyyy HH:mm:ss") << QSL("dd MMM yyyy hh:mm:ss") << QSL("dd MMM yyyy")
|
||||||
<< QSL("yyyy-MM-dd") << QSL("yyyy") << QSL("yyyy-MM") << QSL("yyyy-MM-dd")
|
<< QSL("yyyy-MM-dd HH:mm:ss.z") << QSL("yyyy-MM-dd") << QSL("yyyy") << QSL("yyyy-MM")
|
||||||
<< QSL("yyyy-MM-ddThh:mm") << QSL("yyyy-MM-ddThh:mm:ss") << QSL("d MMM yyyy HH:mm:ss")
|
<< QSL("yyyy-MM-dd") << QSL("yyyy-MM-ddThh:mm") << QSL("yyyy-MM-ddThh:mm:ss")
|
||||||
<< QSL("hh:mm:ss") << QSL("h:m:s AP") << QSL("h:mm") << QSL("H:mm") << QSL("h:m") << QSL("h.m");
|
<< QSL("d MMM yyyy HH:mm:ss") << QSL("hh:mm:ss") << QSL("h:m:s AP") << QSL("h:mm") << QSL("H:mm")
|
||||||
|
<< QSL("h:m") << QSL("h.m");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString TextFactory::encrypt(const QString& text, quint64 key) {
|
QString TextFactory::encrypt(const QString& text, quint64 key) {
|
||||||
|
|
|
@ -283,6 +283,10 @@ QDateTime RssParser::xmlMessageDateCreated(const QDomElement& msg_element) const
|
||||||
date_created = TextFactory::parseDateTime(msg_element.namedItem(QSL("date")).toElement().text());
|
date_created = TextFactory::parseDateTime(msg_element.namedItem(QSL("date")).toElement().text());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (date_created.isNull()) {
|
||||||
|
date_created = TextFactory::parseDateTime(msg_element.namedItem(QSL("dc:modified")).toElement().text());
|
||||||
|
}
|
||||||
|
|
||||||
return date_created;
|
return date_created;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue