Fix time formatting in links.

This commit is contained in:
John Preston 2021-02-24 15:10:06 +04:00
parent 740ffb3c64
commit 7b80514986

View file

@ -166,7 +166,7 @@ private:
link.usageLimit) link.usageLimit)
: tr::lng_group_invite_no_joined(tr::now); : tr::lng_group_invite_no_joined(tr::now);
const auto add = [&](const QString &text) { const auto add = [&](const QString &text) {
result += QString::fromUtf8(" \xE2\xB8\xB1 ") + text; result += QString::fromUtf8(" \xE2\x80\xA2 ") + text;
}; };
if (revoked) { if (revoked) {
return result; return result;
@ -189,8 +189,7 @@ private:
left / 86400)); left / 86400));
} else { } else {
const auto time = base::unixtime::parse(link.expireDate).time(); const auto time = base::unixtime::parse(link.expireDate).time();
add(time.toString(QLocale::system().dateTimeFormat( add(QLocale::system().toString(time, QLocale::LongFormat));
QLocale::LongFormat)));
} }
} }
return result; return result;