From 9688b3520f9e04af2e22fa62cc1c9dd9832ed511 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Tue, 1 Aug 2023 09:21:53 +0300 Subject: [PATCH] assume the time spec of QDate and QTime is Qt::LocalTime in QLocale::toString() methods for compat Signed-off-by: Ivailo Monev --- src/core/tools/qlocale.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/tools/qlocale.cpp b/src/core/tools/qlocale.cpp index f82c1d831..303057ca6 100644 --- a/src/core/tools/qlocale.cpp +++ b/src/core/tools/qlocale.cpp @@ -903,7 +903,7 @@ QString QLocale::toString(qulonglong i) const QString QLocale::toString(const QDate &date, const QString &format) const { - return d()->dateTimeToString(format, &date, 0, this, false); + return d()->dateTimeToString(format, &date, 0, this, true); } /*! @@ -943,7 +943,7 @@ static bool timeFormatContainsAP(const QString &format) */ QString QLocale::toString(const QTime &time, const QString &format) const { - return d()->dateTimeToString(format, 0, &time, this, false); + return d()->dateTimeToString(format, 0, &time, this, true); } /*! -- 2.11.0