Review Request 114321: Fix timezone saving in System Settings -> Date & Time

Lukáš Tinkl lukas at kde.org
Fri Dec 6 12:27:00 GMT 2013



> On Dec. 6, 2013, 12:52 a.m., Martin Klapetek wrote:
> > Note that Debian-based systems actually do copy the file rather than symlink - main reason being that if you use a symlink and your /usr is mounted on a separate partition, anything that starts before /usr gets mounted will not have the correct timezone.
> 
> John Layt wrote:
>     And it's not just that...  Old versions of Red Hat also copied the file, and Debian stores the current tz name in /etc/timezone, and Red Hat and openSUSE store it in /etc/sysconfig/clock.  Some older distros have the tz files in /usr/lib/zoneinfo instead of /usr/share/zoneinfo.  And who knows what else other distros do!  This code scares me (the old code especially so, why is it calling zic?), we're making all sorts of assumptions about the underlying system that we can't be sure of and changing things that could break the users system.  Personally, I think the distros need to take care of this side of things by providing a script for us to call.  I think most distros do have different command line tools to do it, but finding and maintaining them all would be a nightmare.  Perhaps we need to install and call a script kde-set-timezone which the distros can then modify to call their own tools?
>     
>     Hmmmm, I almost find myself wishing systemd would take care of all this for us :-)
> 
> Jan Kundrát wrote:
>     You mean http://www.freedesktop.org/wiki/Software/systemd/timedated/ , right?
> 
> John Layt wrote:
>     Yes, but having looked at that before it is also broken in exactly the same way.  It's obvious it has never been properly integrated on a Debian system.  It needs changing to allow for distro specific config scripts for setting the tz.  It could also use some extra calls added like we have in ktimezoned.

Yeah I tried using timedated as well but it fails spectacularly to update the Timezone property when you change it from outside (like on RHEL/Fedora) using system-config-date. This way it works using all the testcases I tried


- Lukáš


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/114321/#review45240
-----------------------------------------------------------


On Dec. 6, 2013, 12:24 a.m., Lukáš Tinkl wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/114321/
> -----------------------------------------------------------
> 
> (Updated Dec. 6, 2013, 12:24 a.m.)
> 
> 
> Review request for kde-workspace.
> 
> 
> Bugs: 159171 and 323511
>     http://bugs.kde.org/show_bug.cgi?id=159171
>     http://bugs.kde.org/show_bug.cgi?id=323511
> 
> 
> Repository: kde-workspace
> 
> 
> Description
> -------
> 
> - fix saving/loading of timezones in kcmclock
> - do not mark the module as changed right after the new timezone gets loaded back
> 
> Besides the above mentioned bugs, it also fixes https://bugzilla.redhat.com/show_bug.cgi?id=990146
> 
> 
> Diffs
> -----
> 
>   kcontrol/dateandtime/dtime.cpp 518afe5 
>   kcontrol/dateandtime/helper.cpp 9168db3 
>   kcontrol/dateandtime/main.cpp 2fa0f3e 
> 
> Diff: http://git.reviewboard.kde.org/r/114321/diff/
> 
> 
> Testing
> -------
> 
> In the past, this would for some reason only work sporadically and make ktimezoned utterly confused; now it correctly sets a symlink (instead of copying the file over) from /etc/localtime to the respective file under /usr/share/zoneinfo (as described in "man tzset"). The symlink points to the right location after each save. Launching the module again, it shows the correct timezone, as previously saved. 
> 
> 
> Thanks,
> 
> Lukáš Tinkl
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20131206/76d56b7f/attachment.htm>


More information about the kde-core-devel mailing list