Bug 384806 - Digital clock shows wrong time after time zone change
Summary: Digital clock shows wrong time after time zone change
Status: RESOLVED UPSTREAM
Alias: None
Product: plasmashell
Classification: Plasma
Component: Digital Clock widget (show other bugs)
Version: 5.10.5
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-18 03:18 UTC by Leonard Lausen
Modified: 2017-10-30 09:38 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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?