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 <volker.hilsheimer@qt.io>
(cherry picked from commit 6e4d9ff74d518d81842936be1c905b71b67e1352)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Thiago Macieira 2023-09-20 21:47:26 -07:00 committed by Qt Cherry-pick Bot
parent 43fd66f144
commit 8273557bd3

View File

@ -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();