From 8273557bd3554ae14afe9a33f07deabf485196dd 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. Change-Id: I9d43e5b91eb142d6945cfffd1786d094a123826a Reviewed-by: Volker Hilsheimer (cherry picked from commit 6e4d9ff74d518d81842936be1c905b71b67e1352) Reviewed-by: Qt Cherry-pick Bot --- 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 d94cd452cfe..3e73133e31d 100644 --- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -1386,7 +1386,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();