From 6e4d9ff74d518d81842936be1c905b71b67e1352 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 20 Sep 2023 21:47:26 -0700 Subject: [PATCH] moveToTrash/Unix: use Qt::ISODate to format the current date Instead of forcing QDateTime to parse our pattern. Pick-to: 6.6 Change-Id: I9d43e5b91eb142d6945cfffd1786d094a123826a Reviewed-by: Volker Hilsheimer --- src/corelib/io/qfilesystemengine_unix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp index cf33dde975..292c1ed434 100644 --- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -1389,7 +1389,7 @@ bool QFileSystemEngine::moveFileToTrash(const QFileSystemEntry &source, QByteArray info = "[Trash Info]\n" "Path=" + QUrl::toPercentEncoding(infoPath, "/") + "\n" - "DeletionDate=" + QDateTime::currentDateTime().toString("yyyy-MM-ddThh:mm:ss"_L1).toUtf8() + "DeletionDate=" + QDateTime::currentDateTime().toString(Qt::ISODate).toUtf8() + "\n"; infoFile.write(info); infoFile.close();