Checked in qtbase 5.15 at ./src/corelib/time/qtimezoneprivate_tz.cpp The systems timezone is detected by $TZ or by reading the target of the sym-link /etc/localtime or by /etc/TZ. None of those is valid in my system, so UTC is selected: According to the handbook I set the timezone in /etc/timezone and sys-libs/timezone-data copies the right file to /etc/timezone. As workaround I used "ln -s /etc/timezone /etc/TZ". Reproducible: Always
I checked that on a Ubuntu system where /etc/timezone is a text file containing "Europe/Amsterdam" (in my case) and where /etc/localtime is the usual symlink. It looks like QTzTimeZonePrivate::systemTimeZoneId only checks for the symbolic link, indeed.
https://github.com/qt/qtbase/commit/333d7e6de434fbe7777f948761ac5e7b5065d83f#diff-c9a2868baf32badef92f0ff9bd79264fL1153
copying the zonefile to /etc/localtime is a good idea, as /usr could be on a separate partition. How about creating the /etc/TZ -> /etc/timezone softlink by default?
So, what can we do here?
(In reply to Andreas Sturmlechner from comment #4) > So, what can we do here? https://github.com/qt/qtbase/commit/87b07a60da183a60a7e7c79e5daa3ab69a03b4c3 How about just backporting this? (I want a pony.)
(In reply to Andreas K. Hüttel from comment #5) > (In reply to Andreas Sturmlechner from comment #4) > > So, what can we do here? > > https://github.com/qt/qtbase/commit/87b07a60da183a60a7e7c79e5daa3ab69a03b4c3 > > How about just backporting this? > > (I want a pony.) Unfortunately that's not the full solution. (The digital clock now doesnt even appear anymore...)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8cc44eb4b719129f109dfa623efd5420d1665b63 commit 8cc44eb4b719129f109dfa623efd5420d1665b63 Author: Andreas K. Hüttel <dilfridge@gentoo.org> AuthorDate: 2020-10-10 17:39:33 +0000 Commit: Andreas K. Hüttel <dilfridge@gentoo.org> CommitDate: 2020-10-10 17:40:00 +0000 dev-qt/qtcore: Revert timezone handling to 5.14 state This is an obvious workaround, until we and upstream have decided what to do... Closes: https://bugs.gentoo.org/737914 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> dev-qt/qtcore/files/qtcore-5.15.1-timezone-1.patch | 271 +++++++++++++++++++++ dev-qt/qtcore/files/qtcore-5.15.1-timezone-2.patch | 47 ++++ dev-qt/qtcore/qtcore-5.15.1-r1.ebuild | 104 ++++++++ 3 files changed, 422 insertions(+)
*** Bug 739668 has been marked as a duplicate of this bug. ***
Lars, nvm if I remember incorrectly but please test the linked upstream qtbase MR (patches against qtcore) if you still have a system with separate /usr and/or /etc/{timezone,localtime} as file.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/qt.git/commit/?id=99ee62b2dd16d747c666d86a12c005c5c356dbe9 commit 99ee62b2dd16d747c666d86a12c005c5c356dbe9 Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2022-01-19 16:49:25 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2022-01-19 16:49:39 +0000 dev-qt/qtcore: Drop obsolete downstream reverts Upstream MR was merged: https://invent.kde.org/qt/qt/qtbase/-/merge_requests/111 QTBUG: https://bugreports.qt.io/browse/QTBUG-87326 Bug: https://bugs.gentoo.org/737914 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> dev-qt/qtcore/files/qtcore-5.15.1-timezone-1.patch | 271 --------------------- dev-qt/qtcore/files/qtcore-5.15.1-timezone-2.patch | 47 ---- dev-qt/qtcore/qtcore-5.15.2.9999.ebuild | 3 +- 3 files changed, 1 insertion(+), 320 deletions(-)
(In reply to Andreas Sturmlechner from comment #9) > Lars, nvm if I remember incorrectly but please test the linked upstream > qtbase MR (patches against qtcore) if you still have a system with separate > /usr and/or /etc/{timezone,localtime} as file. Hi Andreas, sorry for not responding earlier, my day was quite stuffed with online meetings. If you still want to have it tested, I can do so tomorrow...
Wouldn't hurt before we cut a new snapshot, but take your time. It is rather easy by adding qt overlay and building qtcore-5.15.2.9999 instead of latest snapshot in ::gentoo.