Merge pull request #6748 from nextcloud/fix/revert-date-parsing-fix

Revert "Fix incorrect date parsing."
This commit is contained in:
Matthieu Gallien 2024-09-05 19:01:47 +02:00 committed by GitHub
commit 5f1256c3d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -219,8 +219,8 @@ SyncFileItemPtr SyncFileItem::fromProperties(const QString &filePath, const QMap
const auto intConvertedValue = properties.value(QStringLiteral("lock-timeout")).toULongLong(&ok);
item->_lockTimeout = ok ? intConvertedValue : 0;
}
const auto lastModifiedValue = properties.value(QStringLiteral("getlastmodified")).replace("GMT", "+0000");
const auto date = QDateTime::fromString(lastModifiedValue, Qt::RFC2822Date);
const auto date = QDateTime::fromString(properties.value(QStringLiteral("getlastmodified")), Qt::RFC2822Date);
Q_ASSERT(date.isValid());
if (date.toSecsSinceEpoch() > 0) {
item->_modtime = date.toSecsSinceEpoch();