← Back to team overview

ubuntu-sdk-bugs team mailing list archive

[Bug 1622089] [NEW] timezone parser in qt-5.5 breaks KDE clock

 

Public bug reported:

For a set of timezones in tzdata-2016*
Qt parser produces wrong result in
Qt versions earlier than 5.6.

In kubuntu-16.04 xenial xerus the most annoying
issue is broken digital clock plasmoid on the default KDE panel
if system timezone is set to e.g. Asia/Novosibirsk.
All Qt programs that attempts to convert time to non-default
timezone are affected as well in xenial and earlier ubuntu released
including ubuntu-14.04 LTS trusty.

I consider the bug is nasty enough for updating Qt in LTS ubuntu
releases.

The upstream bug is https://bugreports.qt.io/browse/QTBUG-53071
"QTimeZone mishandles tzdata 2016b and later in Russia, Kazakhstan".
The direct link to the patch that fixes the problem is
https://codereview.qt-project.org/gitweb?p=qt/qtbase.git;a=patch;h=e9041c7fc1052167f1ec2df0ea9623059e55d00f

I have rebuilt qtbase-opensource-src-5.5.1+dfsg (-16ubuntu7.1)
from sources with the patch applied and the bug has gone away.

A bit more details.

I faced the problem with Kubuntu 16.04.1, x86_64.
Asia/Novosibirsk has UTC+07:00 offset last a couple of months
but KDE clock shows a time that has offset of 14 hours from the actual wall time,
so it is rather unusable.
Command line tool "date" reports correct local time.
KDE digital clock works correctly in e.g. Asia/Krasnoyarsk timezone.
It as a workaround if time transition history does not matter.

Some other timezones affected by the bug (tzdata-2106f)
file europe:
Europe/Astrakhan
Europe/Kirov
Europe/Ulyanovsk
Asia/Barnaul
Asia/Novosibirsk
Asia/Tomsk
Asia/Novokuznetsk
file asia:
Asia/Almaty
Asia/Qyzylorda
Asia/Aqtobe
Asia/Aqtau
Asia/Oral

A simple program to demonstrate the problem:

#include <QDebug>
#include <QTimeZone>
#include <QDateTime>

int main() {
        QTimeZone tz = QTimeZone(QTimeZone::systemTimeZoneId());
        QDateTime current = QDateTime::currentDateTime();
        qDebug() << "current offset" << tz.offsetFromUtc(current);
        return 0;
}

It reports 0 for incorrectly parsed timezones.

The only thing that bothers me is that I had to disable tests
when was rebuilding libqt5core5a_5.5.1+dfsg-16ubuntu7.1_amd64.deb
using dpg-buildpackage. Otherwise I got error with cmake
in tests/auto/cmake/. Cmake was unable to find qt libraries
in the build tree.

** Affects: qtbase-opensource-src (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: patch xenial

-- 
You received this bug notification because you are a member of Ubuntu
SDK bug tracking, which is subscribed to qtbase-opensource-src in
Ubuntu.
https://bugs.launchpad.net/bugs/1622089

Title:
  timezone parser in qt-5.5 breaks KDE clock

Status in qtbase-opensource-src package in Ubuntu:
  New

Bug description:
  For a set of timezones in tzdata-2016*
  Qt parser produces wrong result in
  Qt versions earlier than 5.6.

  In kubuntu-16.04 xenial xerus the most annoying
  issue is broken digital clock plasmoid on the default KDE panel
  if system timezone is set to e.g. Asia/Novosibirsk.
  All Qt programs that attempts to convert time to non-default
  timezone are affected as well in xenial and earlier ubuntu released
  including ubuntu-14.04 LTS trusty.

  I consider the bug is nasty enough for updating Qt in LTS ubuntu
  releases.

  The upstream bug is https://bugreports.qt.io/browse/QTBUG-53071
  "QTimeZone mishandles tzdata 2016b and later in Russia, Kazakhstan".
  The direct link to the patch that fixes the problem is
  https://codereview.qt-project.org/gitweb?p=qt/qtbase.git;a=patch;h=e9041c7fc1052167f1ec2df0ea9623059e55d00f

  I have rebuilt qtbase-opensource-src-5.5.1+dfsg (-16ubuntu7.1)
  from sources with the patch applied and the bug has gone away.

  A bit more details.

  I faced the problem with Kubuntu 16.04.1, x86_64.
  Asia/Novosibirsk has UTC+07:00 offset last a couple of months
  but KDE clock shows a time that has offset of 14 hours from the actual wall time,
  so it is rather unusable.
  Command line tool "date" reports correct local time.
  KDE digital clock works correctly in e.g. Asia/Krasnoyarsk timezone.
  It as a workaround if time transition history does not matter.

  Some other timezones affected by the bug (tzdata-2106f)
  file europe:
  Europe/Astrakhan
  Europe/Kirov
  Europe/Ulyanovsk
  Asia/Barnaul
  Asia/Novosibirsk
  Asia/Tomsk
  Asia/Novokuznetsk
  file asia:
  Asia/Almaty
  Asia/Qyzylorda
  Asia/Aqtobe
  Asia/Aqtau
  Asia/Oral

  A simple program to demonstrate the problem:

  #include <QDebug>
  #include <QTimeZone>
  #include <QDateTime>

  int main() {
          QTimeZone tz = QTimeZone(QTimeZone::systemTimeZoneId());
          QDateTime current = QDateTime::currentDateTime();
          qDebug() << "current offset" << tz.offsetFromUtc(current);
          return 0;
  }

  It reports 0 for incorrectly parsed timezones.

  The only thing that bothers me is that I had to disable tests
  when was rebuilding libqt5core5a_5.5.1+dfsg-16ubuntu7.1_amd64.deb
  using dpg-buildpackage. Otherwise I got error with cmake
  in tests/auto/cmake/. Cmake was unable to find qt libraries
  in the build tree.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1622089/+subscriptions


Follow ups