Merge pull request #1025 from japa4551/lastLaunchTimeDate

This commit is contained in:
Sefa Eyeoglu 2023-04-27 10:09:53 +02:00 committed by GitHub
commit f54fc16718
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -925,7 +925,10 @@ QString MinecraftInstance::getStatusbarDescription()
if(m_settings->get("ShowGameTime").toBool())
{
if (lastTimePlayed() > 0) {
description.append(tr(", last played for %1").arg(Time::prettifyDuration(lastTimePlayed())));
QDateTime lastLaunchTime = QDateTime::fromMSecsSinceEpoch(lastLaunch());
description.append(tr(", last played on %1 for %2")
.arg(QLocale().toString(lastLaunchTime, QLocale::ShortFormat))
.arg(Time::prettifyDuration(lastTimePlayed())));
}
if (totalTimePlayed() > 0) {