From aa67a52a969f3ef336b845857c48a76a5e319987 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Wed, 27 Apr 2016 16:44:35 +0200 Subject: Deal with custom timezones (non-UTC) in KDE4 and PLASMA5. --- liveinit | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'liveinit') diff --git a/liveinit b/liveinit index f4bda31..bd251e6 100755 --- a/liveinit +++ b/liveinit @@ -815,6 +815,17 @@ EOT # You should run timeconfig to edit this file. localtime EOT + # QT5 expects "/etc/localtime" to be a symlink. Slackware's file is a real + # file so QT5 fails to determine the timezone and falls back to UTC. Fix: + echo ${TZ} > /mnt/overlay/etc/timezone + sed -i -n "p;s/^\( *\)rm -f localtime$/\1echo \$TZ > timezone/p" \ + /mnt/overlay//usr/sbin/timeconfig + + # KDE4 and PLASMA5 user timezone re-configuration: + sed -i -e "s%^LocalZone=.*%LocalZone=${TZ}%" \ + /mnt/overlay/home/live/.kde/share/config/ktimezonedrc + sed -i -e "s%^LocalZone=.*%LocalZone=${TZ}%" \ + /mnt/overlay/home/live/.config/ktimezonedrc fi if [ ! -z "$LIVEPW" ]; then -- cgit v1.2.3