Bug 467494

Summary: Change of timezone is not reflected in Digital Clock applet's settings immediately
Product: [Plasma] plasmashell Reporter: postix <postix>
Component: Digital Clock widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: kde, nate, postix, qydwhotmail
Priority: NOR    
Version First Reported In: 5.27.3   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=436084
Latest Commit: Version Fixed/Implemented In: 5.27.4
Sentry Crash Report:
Attachments: Screenrecording

Description postix 2023-03-17 14:41:44 UTC
STEPS TO REPRODUCE
1. Open the digital clock's settings
2. Go to Timezone
3. Click on "Change timezone of the system ..."
4. Systemsettings opens, change the timezone there and click "apply" and close Systemsettings

OBSERVED RESULT
The former timezone still appears in the applet's settings. It first changes when going to a different tab and back to Timezone.

EXPECTED RESULT
The change is reflected immediately.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20230312
KDE Plasma Version: 5.27.2
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Graphics Platform: Wayland
Comment 1 David Edmundson 2023-03-25 13:01:53 UTC
Can you confirm if kded is running and if the ktimezoned module is running within it.

`qdbus org.kde.kded5` would list `/modules/ktimezoned`
Comment 2 postix 2023-03-25 13:14:27 UTC
kded5 is up and running and `qdbus org.kde.kded5` does list `/modules/ktimezoned`. The bug is still and always reproducible for me.
Comment 3 Fushan Wen 2023-03-25 15:26:32 UTC
Cannot reproduce
Comment 4 postix 2023-03-25 15:32:19 UTC
Created attachment 157573 [details]
Screenrecording

Here's a screen recording, which shows the steps.
Comment 5 Bug Janitor Service 2023-03-25 16:36:22 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2773
Comment 6 Fushan Wen 2023-03-29 18:26:26 UTC
Git commit 1b65c6b362b081c5ca252356d240befcba72288c by Fushan Wen.
Committed on 29/03/2023 at 18:26.
Pushed by fusionfuture into branch 'Plasma/5.27'.

applets/digital-clock: reload timezone after saving in Datetime KCM

The datetime KCM emits a signal `clockUpdated` after the timezone is updated. Listen to the signal and reload the model when the signal is emitted. After the model is updated, re-apply selected timezones or select the updated default timezone when there is no selected timezone in the config dialog.

This allows the default timezone in the widget's config dialog to be updated immediately after system timezone changes.
FIXED-IN: 5.27.4

M  +15   -6    applets/digital-clock/plugin/timezonemodel.cpp
M  +3    -0    applets/digital-clock/plugin/timezonemodel.h

https://invent.kde.org/plasma/plasma-workspace/commit/1b65c6b362b081c5ca252356d240befcba72288c
Comment 7 Fushan Wen 2023-03-30 00:58:12 UTC
Git commit 9db63631f17988cadcc1fd935a8218c1c05ecaa4 by Fushan Wen.
Committed on 30/03/2023 at 00:49.
Pushed by fusionfuture into branch 'master'.

applets/digital-clock: reload timezone after saving in Datetime KCM

The datetime KCM emits a signal `clockUpdated` after the timezone is updated. Listen to the signal and reload the model when the signal is emitted. After the model is updated, re-apply selected timezones or select the updated default timezone when there is no selected timezone in the config dialog.

This allows the default timezone in the widget's config dialog to be updated immediately after system timezone changes.
FIXED-IN: 5.27.4


(cherry picked from commit 1b65c6b362b081c5ca252356d240befcba72288c)

M  +15   -6    applets/digital-clock/plugin/timezonemodel.cpp
M  +3    -0    applets/digital-clock/plugin/timezonemodel.h

https://invent.kde.org/plasma/plasma-workspace/commit/9db63631f17988cadcc1fd935a8218c1c05ecaa4