From 7c69c5e468dac274f6e9d67a89723db3dcc221f5 Mon Sep 17 00:00:00 2001 From: alex-z Date: Wed, 8 May 2024 00:45:08 +0200 Subject: [PATCH] Fix incorrect date parsing. Signed-off-by: alex-z --- src/libsync/syncfileitem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libsync/syncfileitem.cpp b/src/libsync/syncfileitem.cpp index 6bf10cd7af1b0..a7fd1c7d53e98 100644 --- a/src/libsync/syncfileitem.cpp +++ b/src/libsync/syncfileitem.cpp @@ -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 date = QDateTime::fromString(properties.value(QStringLiteral("getlastmodified")), Qt::RFC2822Date); + const auto lastModifiedValue = properties.value(QStringLiteral("getlastmodified")).replace("GMT", "+0000"); + const auto date = QDateTime::fromString(lastModifiedValue, Qt::RFC2822Date); Q_ASSERT(date.isValid()); if (date.toSecsSinceEpoch() > 0) { item->_modtime = date.toSecsSinceEpoch();