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

Sven Jans <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 739d370a4e573ebf00a368767f656ff44be8dfb4 by Sven Jans.
Committed on 06/08/2026 at 13:00.
Pushed by devinlin into branch 'master'.

Fix time zone formatting for some locales

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

https://invent.kde.org/utilities/kclock/-/commit/739d370a4e573ebf00a368767f656ff44be8dfb4

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.