[utilities/kclock/release/26.08] src/kclock: Fix time zone formatting for some locales

Devin Lin <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit b887cba6b84d36294664b6ec6ac0af8548accd29 by Devin Lin.
Committed on 06/08/2026 at 13:47.
Pushed by devinlin into branch 'release/26.08'.

Fix time zone formatting for some locales


(cherry picked from commit 739d370a4e573ebf00a368767f656ff44be8dfb4)

Co-authored-by: Sven Jans <[email protected]>

M  +2    -1    src/kclock/utilmodel.cpp

https://invent.kde.org/utilities/kclock/-/commit/b887cba6b84d36294664b6ec6ac0af8548accd29

diff --git a/src/kclock/utilmodel.cpp b/src/kclock/utilmodel.cpp
index cfe6e367..bb4bec2d 100644
--- a/src/kclock/utilmodel.cpp
+++ b/src/kclock/utilmodel.cpp
@@ -60,7 +60,8 @@ QString UtilModel::getDefaultAlarmFileLocation()
 
 QString UtilModel::getCurrentTimeZoneName()
 {
-    return QTimeZone::systemTimeZone().displayName(QTimeZone::GenericTime);
+    QDateTime currentDateTime = QDateTime::currentDateTime();
+    return currentDateTime.timeZone().displayName(currentDateTime, QTimeZone::LongName, QLocale::system());
 }
 
 long long UtilModel::calculateNextRingTime(int hours, int minutes, int daysOfWeek, int snooze)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.