Bug 392756 - Can't change time zone && ktimezonedrc gets overwritten at log-in
Summary: Can't change time zone && ktimezonedrc gets overwritten at log-in
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Digital Clock widget (show other bugs)
Version: 5.11.5
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-05 12:32 UTC by t.schmittlauch
Modified: 2018-05-02 15:10 UTC (History)
1 user (show)

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


Attachments
~/.config/plasma-org.kde.plasma.desktop-appletsrc (8.65 KB, text/plain)
2018-04-05 13:48 UTC, t.schmittlauch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description t.schmittlauch 2018-04-05 12:32:37 UTC
I can't change my time zone using `kcmshell5 clock`: Changing the time zon there shows no effect, the time zone is always stuck at "Europe/Helsinki" (which I set manually once).

Even worse,

How to reproduce:

1. open `kcmshell5 clock`
2. Change the time zone to a different one and save.
3. check the clock plasmoid timezone settings for the local time zone or look at the default time zone for new events in KOrganizer

Expected result:

The clock plasmoid should display the new set time zone as "local", the new zone should be default in KOrganizer, the new zone should appear in ~/.config/ktimezonedrc

Even worse, manual changes are not honoured and partly even overwritten:

`/etc/localtime` and `timedatectl` always point to/ report the correct time zone (in my case Europe/Berlin).
`~/.config/ktimezonedrc` gets overwritten during login:
I changed "LocalZone" to Europe/Berlin manually before logging in. After logging in to a plasma5 session, that value was changed to Europe/Helsinki again.

Are there any config files/ databases I'm missing?
Comment 1 David Edmundson 2018-04-05 12:35:31 UTC
What does "timedatectl" say
Comment 2 t.schmittlauch 2018-04-05 12:39:19 UTC
It always shows the intended time zone:

```
# timedatectl                                                                                                                                                     
                      Local time: Do 2018-04-05 14:36:37 CEST
                  Universal time: Do 2018-04-05 12:36:37 UTC
                        RTC time: Do 2018-04-05 12:36:37
                       Time zone: Europe/Berlin (CEST, +0200)
       System clock synchronized: yes
systemd-timesyncd.service active: yes
                 RTC in local TZ: no

# ls -l /etc/localtime 
lrwxrwxrwx 1 root root 35  5. Apr 14:14 /etc/localtime -> ../usr/share/zoneinfo/Europe/Berlin
```
Comment 3 t.schmittlauch 2018-04-05 12:58:39 UTC
According to `fatrace` ~/.config/ktimezonedrc is overwritten by kded5 at login.
Question still is: based on which information, and why does setting time zones via kcmshell not work?
Comment 4 David Edmundson 2018-04-05 13:23:15 UTC
ktimezoned isn't actually very relevant. We can completely ignore that.

Can I see your: ~/.config/plasma-org.kde.plasma.desktop-appletsrc
Comment 5 t.schmittlauch 2018-04-05 13:48:22 UTC
Created attachment 111848 [details]
~/.config/plasma-org.kde.plasma.desktop-appletsrc
Comment 6 t.schmittlauch 2018-04-05 13:48:43 UTC
The biggest annoyance right now is the wrong default time zone in KOrganizer.
Comment 7 Christoph Feck 2018-05-02 01:30:55 UTC
David, does comment #5 help to investigate the issue?
Comment 8 t.schmittlauch 2018-05-02 15:10:57 UTC
I managed to solve the issue by deleting /etc/timezone

The funny thing is that I never created or edited that file myself as Gentoo manages time with /etc/localtime symlinks.
It'd be interesting to find out how /etc/timezone was ever created, but as I can't reproduce that behaviour I'll close this as fixed.