Export chats with ISO 8601 dates

Fixes #6020
This commit is contained in:
Magnus Groß 2020-07-26 14:01:33 +02:00 committed by John Preston
parent 188b98b4d8
commit 4f3f1e18a2
1 changed files with 3 additions and 5 deletions

View File

@ -33,11 +33,9 @@ QString NormalizePath(const Settings &settings) {
}
const auto date = QDate::currentDate();
const auto base = QString(settings.onlySinglePeer()
? "ChatExport_%1_%2_%3"
: "DataExport_%1_%2_%3"
).arg(date.day(), 2, 10, QChar('0')
).arg(date.month(), 2, 10, QChar('0')
).arg(date.year());
? "ChatExport_%1"
: "DataExport_%1"
).arg(date.toString(Qt::ISODate));
const auto add = [&](int i) {
return base + (i ? " (" + QString::number(i) + ')' : QString());
};