Bug 1114570 - Digital clock widget dislplays wrong local time
Summary: Digital clock widget dislplays wrong local time
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: KDE Workspace (Plasma) (show other bugs)
Version: Leap 15.0
Hardware: x86-64 Other
: P5 - None : Minor with 2 votes (vote)
Target Milestone: ---
Assignee: E-Mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-03 15:17 UTC by Michal Kozlowski
Modified: 2019-04-10 09:52 UTC (History)
5 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Differences between cli date and digital clock widget. (57.39 KB, image/png)
2018-11-03 15:17 UTC, Michal Kozlowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Kozlowski 2018-11-03 15:17:22 UTC
Created attachment 788337 [details]
Differences between cli date and digital clock widget.

Digital clock widget displays time -2 hours (See attachement).

My timezone is Europe/Dublin
michal@x200:~> ls -l /etc/localtime
lrwxrwxrwx 1 root root 35 Oct 29 14:02 /etc/localtime -> ../usr/share/zoneinfo/Europe/Dublin

Hardware clock is set to UTC.
michal@x200:~> date
Sat Nov  3 14:54:55 GMT 2018
michal@x200:~> timedatectl
      Local time: Sat 2018-11-03 14:54:56 GMT
  Universal time: Sat 2018-11-03 14:54:56 UTC
        RTC time: Sat 2018-11-03 14:54:58
       Time zone: Europe/Dublin (GMT, +0000)
 Network time on: no
NTP synchronized: no
 RTC in local TZ: no

There is no dualboot (hardware is not shared with Windows OS).

First I thing, that this error is for local user, but I check it for other system user, then for root.
For test I've tried to recreate error:
I've build virtual machine in virtualbox and install fresh OpenSUSE 15.0 from openSUSE-Leap-15.0-DVD-x86_64.iso
I've used default settings for KDE desktop (in installer).
I've set timezone to Europe/Ireland in installer.
I've skiped adding users. Afrer instalation cli time and digital clock widget shows the same (correct) time.
Then I run full update with default repositories (zypper up).
After update and restart I recreated this error in fresh system. (Instalation and update has been done at 3th November 2018).
Comment 1 Joachim Wagner 2018-11-04 11:50:25 UTC
I can confirm this. Since the change from IST to GMT last weekend the widget shows -2h. The alternative "Analogue Clock" and "Fuzzy Clock" widgets show +2h.

Thanks Michal for reporting that a fresh install + updates does not fix the issue.  That would have been my next step.

Workaround: Switch to a widget that doesn't show the time and run "xclock".
Comment 2 Joachim Wagner 2018-11-28 09:17:02 UTC
Posted
https://forums.opensuse.org/showthread.php/534000-KDE-Clock-shows-incorrect-time-since-daylight-change?p=2887469#post2887469
to get feedback, e.g. whether people outside timezone Europe/Dublin have this problem.
Comment 3 Fabian Vogt 2018-11-28 15:29:24 UTC
Seems to be caused by https://bugzilla.suse.com/show_bug.cgi?id=1073299

Qt 5.9 doesn't deal with negative DST offsets:

return (tmtm.tm_isdst > 0) ? 3600000 : 0;

I'll try to backport the upstream rewrite of the surrounding code.
Comment 4 Fabian Vogt 2018-11-29 07:58:05 UTC
(In reply to Fabian Vogt from comment #3)
> Seems to be caused by https://bugzilla.suse.com/show_bug.cgi?id=1073299
> 
> Qt 5.9 doesn't deal with negative DST offsets:
> 
> return (tmtm.tm_isdst > 0) ? 3600000 : 0;
> 
> I'll try to backport the upstream rewrite of the surrounding code.

Done. It seems to fix the issue for me.

Please install libQtQuick5 from obs://home:Vogtinator:boo1114570/standard and report back.
Comment 5 Michal Kozlowski 2018-11-29 11:59:39 UTC
Hi Team,

I confirm, after instalation: libQtQuick5 from obs://home:Vogtinator:boo1114570/standard bug has been fixed.

Details:
URL to obs:
https://software.opensuse.org//download.html?project=home%3AVogtinator%3Aboo1114570&package=libqt5-qtdeclarative

There is one source rpm: libqt5-qtdeclarative-5.9.4-lp150.3.1.src.rpm
sha256sum /home/michal/Downloads/libqt5-qtdeclarative-5.9.4-lp150.3.1.src.rpm
03e5f34ba1e9f69595a60687a282c15f5c400a4596281af7ffc59fdf4ded0040  /home/michal/Downloads/libqt5-qtdeclarative-5.9.4-lp150.3.1.src.rpm

I've added local directory to repo list, then I've install source rpm:
#zypper si libqt5-qtdeclarative

I've built rpms from installed source rpm:
#rpmbuild -bb /usr/src/packages/SPECS/libqt5-qtdeclarative.spec

List of built rpms:
x200:~ # ls -l /usr/src/packages/RPMS/x86_64
total 103540
-rw-r--r-- 1 root root 66396176 Nov 29 10:56 libQtQuick5-5.9.4-lp150.3.1.x86_64.rpm
-rw-r--r-- 1 root root 14071024 Nov 29 10:56 libqt5-qtdeclarative-devel-5.9.4-lp150.3.1.x86_64.rpm
-rw-r--r-- 1 root root 16088804 Nov 29 10:57 libqt5-qtdeclarative-examples-5.9.4-lp150.3.1.x86_64.rpm
-rw-r--r-- 1 root root  9459344 Nov 29 10:57 libqt5-qtdeclarative-tools-5.9.4-lp150.3.1.x86_64.rpm

I've forced upgrade to built rpms:
rpm -Uvh libQtQuick5-5.9.4-lp150.3.1.x86_64.rpm libqt5-qtdeclarative-devel-5.9.4-lp150.3.1.x86_64.rpm libqt5-qtdeclarative-examples-5.9.4-lp150.3.1.x86_64.rpm libqt5-qtdeclarative-tools-5.9.4-lp150.3.1.x86_64.rpm

Afrer relogin to kde, digital clock widget displays corect time.
Comment 6 Fabian Vogt 2018-11-29 16:10:16 UTC
(In reply to Michal Kozlowski from comment #5)
> Hi Team,
> 
> I confirm, after instalation: libQtQuick5 from
> obs://home:Vogtinator:boo1114570/standard bug has been fixed.

Thanks! I'll try to get this fix into Leap 42.3, 15.0 and 15.1.

> Details:
> URL to obs:
> https://software.opensuse.org//download.
> html?project=home%3AVogtinator%3Aboo1114570&package=libqt5-qtdeclarative
> 
> There is one source rpm: libqt5-qtdeclarative-5.9.4-lp150.3.1.src.rpm
> sha256sum /home/michal/Downloads/libqt5-qtdeclarative-5.9.4-lp150.3.1.src.rpm
> 03e5f34ba1e9f69595a60687a282c15f5c400a4596281af7ffc59fdf4ded0040 
> /home/michal/Downloads/libqt5-qtdeclarative-5.9.4-lp150.3.1.src.rpm
> 
> I've added local directory to repo list, then I've install source rpm:
> #zypper si libqt5-qtdeclarative
> 
> I've built rpms from installed source rpm:
> #rpmbuild -bb /usr/src/packages/SPECS/libqt5-qtdeclarative.spec

Why did you build the RPM yourself?
You can just
> zypper ar obs://home:Vogtinator:boo1114570/standard boo1114570
> zypper -v dup --from boo1114570

and done.

> List of built rpms:
> x200:~ # ls -l /usr/src/packages/RPMS/x86_64
> total 103540
> -rw-r--r-- 1 root root 66396176 Nov 29 10:56
> libQtQuick5-5.9.4-lp150.3.1.x86_64.rpm
> -rw-r--r-- 1 root root 14071024 Nov 29 10:56
> libqt5-qtdeclarative-devel-5.9.4-lp150.3.1.x86_64.rpm
> -rw-r--r-- 1 root root 16088804 Nov 29 10:57
> libqt5-qtdeclarative-examples-5.9.4-lp150.3.1.x86_64.rpm
> -rw-r--r-- 1 root root  9459344 Nov 29 10:57
> libqt5-qtdeclarative-tools-5.9.4-lp150.3.1.x86_64.rpm
> 
> I've forced upgrade to built rpms:
> rpm -Uvh libQtQuick5-5.9.4-lp150.3.1.x86_64.rpm
> libqt5-qtdeclarative-devel-5.9.4-lp150.3.1.x86_64.rpm
> libqt5-qtdeclarative-examples-5.9.4-lp150.3.1.x86_64.rpm
> libqt5-qtdeclarative-tools-5.9.4-lp150.3.1.x86_64.rpm
> 
> Afrer relogin to kde, digital clock widget displays corect time.
Comment 8 Swamp Workflow Management 2019-02-19 14:11:57 UTC
SUSE-RU-2019:0429-1: An update that has one recommended fix can now be installed.

Category: recommended (moderate)
Bug References: 1114570
CVE References: 
Sources used:
SUSE Linux Enterprise Module for Open Buildservice Development Tools 15 (src):    libqt5-qtdeclarative-5.9.4-3.3.3
SUSE Linux Enterprise Module for Desktop Applications 15 (src):    libqt5-qtdeclarative-5.9.4-3.3.3
SUSE Linux Enterprise Module for Basesystem 15 (src):    libqt5-qtdeclarative-5.9.4-3.3.3
Comment 9 Swamp Workflow Management 2019-02-27 11:13:26 UTC
openSUSE-RU-2019:0256-1: An update that has one recommended fix can now be installed.

Category: recommended (moderate)
Bug References: 1114570
CVE References: 
Sources used:
openSUSE Leap 15.0 (src):    libqt5-qtdeclarative-5.9.4-lp150.2.3.1
Comment 10 Joachim Wagner 2019-03-26 08:32:51 UTC
Thanks. Analogue, Digital and Fuzzy Clock widgets showing correct time again.
Comment 11 Fabian Vogt 2019-04-10 09:52:36 UTC
(In reply to Joachim Wagner from comment #10)
> Thanks. Analogue, Digital and Fuzzy Clock widgets showing correct time again.

Finally closing as fixed.