Bug 384806

Summary: Digital clock shows wrong time after time zone change
Product: [Plasma] plasmashell Reporter: Leonard Lausen <leonard>
Component: Digital Clock widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: kde, peter, simonandric5
Priority: NOR    
Version First Reported In: 5.10.5   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Leonard Lausen 2017-09-18 03:18:42 UTC
Adjusting the system time zone from "Date & Time - Systems Settings Module" "Time Zone" leads to the Digital Clock Widget showing the wrong time in case of the clock being setup to show multiple timezones. The clock works correctly once  plasmashell is restarted (i.e. logout, login).

It seems that the clock widget does not recalculate the offsets of the displayed timezones to the system timezone, and naively applies the old offset to the changed system time, leading to a wrongly displayed time.
Comment 1 Peter Wu 2017-10-29 06:57:07 UTC
What distro are you using, do you have an /etc/timezone file? I have noticed the same behavior on Arch Linux. Restarting kplasmashell can also be done without logout/login, e.g. press Alt+F2 and run:
kquitapp5 plasmashell && kstart5 plasmashell

For me it turned out that I had a /etc/timezone file from 2012 which is no longer used. Patch: https://codereview.qt-project.org/209715
Comment 2 Leonard Lausen 2017-10-29 17:21:06 UTC
Thanks Peter. I'm on Gentoo. My /etc/timezone file contains a single line with the active time zone. Do you mean the /etc/timezone file is obsolete?
Comment 3 Peter Wu 2017-10-29 22:24:05 UTC
(In reply to Leonard Lausen from comment #2)
> Thanks Peter. I'm on Gentoo. My /etc/timezone file contains a single line
> with the active time zone. Do you mean the /etc/timezone file is obsolete?

It seems obsolete and can be deleted, especially if you use systemd-timedated (timedatectl). Is your /etc/localtime a symlink?