From 68685bd192e6d77c39c36a6b7213cca687c12bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kyle=20=F0=9F=90=86?= Date: Thu, 16 Jul 2026 20:44:41 -0400 Subject: [PATCH] GUI: Use locale-aware GUIUtil::dateTimeStr for datetime fields --- src/qt/clientmodel.cpp | 2 +- src/qt/modaloverlay.cpp | 2 +- src/qt/rpcconsole.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp index cc04d09407ee..4bf6e0513edd 100644 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -210,7 +210,7 @@ bool ClientModel::isReleaseVersion() const QString ClientModel::formatClientStartupTime() const { - return QDateTime::currentDateTime().addSecs(-TicksSeconds(GetUptime())).toString(); + return GUIUtil::dateTimeStr(QDateTime::currentDateTime().addSecs(-TicksSeconds(GetUptime()))); } QString ClientModel::dataDir() const diff --git a/src/qt/modaloverlay.cpp b/src/qt/modaloverlay.cpp index fb61e82bb627..56e21e95de81 100644 --- a/src/qt/modaloverlay.cpp +++ b/src/qt/modaloverlay.cpp @@ -150,7 +150,7 @@ void ModalOverlay::tipUpdate(int count, const QDateTime& blockDate, double nVeri } // show the last block date - ui->newestBlockDate->setText(blockDate.toString()); + ui->newestBlockDate->setText(GUIUtil::dateTimeStr(blockDate)); // show the percentage done according to nVerificationProgress ui->percentageProgress->setText(QString::number(nVerificationProgress*100, 'f', 2)+"%"); diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 460b13366487..e21ad0997ebe 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -931,7 +931,7 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_ ui->blocksDir->setText(model->blocksDir()); ui->startupTime->setText(model->formatClientStartupTime()); if (g_software_expiry > 0) { - m_label_softwareexpiry->setText(QDateTime::fromSecsSinceEpoch(g_software_expiry).toString()); + m_label_softwareexpiry->setText(GUIUtil::dateTimeStr(g_software_expiry)); } else { //: Software expiry, if it never expires m_label_softwareexpiry->setText(tr("Never")); @@ -1188,7 +1188,7 @@ void RPCConsole::setNumBlocks(int count, const QDateTime& blockDate, double nVer { if (synctype == SyncType::BLOCK_SYNC) { ui->numberOfBlocks->setText(QString::number(count)); - ui->lastBlockTime->setText(blockDate.toString()); + ui->lastBlockTime->setText(GUIUtil::dateTimeStr(blockDate)); } }