Bug 394423 - Incorrect ""today" highlight in clock/calendar view
Summary: Incorrect ""today" highlight in clock/calendar view
Status: RESOLVED FIXED
Alias: None
Product: libplasma
Classification: Frameworks and Libraries
Component: components (show other bugs)
Version: 5.46.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Scott Harvey
URL: https://bugreports.qt.io/browse/QTBUG...
Keywords:
: 393975 394995 395464 395620 395634 395836 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-05-18 20:53 UTC by Scott Harvey
Modified: 2018-06-27 17:02 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Various clocks, same calendar error (1.46 MB, video/mp4)
2018-05-18 20:53 UTC, Scott Harvey
Details
hwclock output (4.66 KB, image/png)
2018-05-18 20:54 UTC, Scott Harvey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Harvey 2018-05-18 20:53:14 UTC
Created attachment 112738 [details]
Various clocks, same calendar error

There appears to be a bug in org.plasma.component.calendar that highlights the wrong day for "today". It's a day behind. I tried it in every clock plasmoid that displays a calendar and got the same incorrect result. They all use the same library. I also checked `hwclock` on my machine and it's accurate.

System: KF5.47, Qt5.11 (Tumbleweed Krypton)
Comment 1 Scott Harvey 2018-05-18 20:54:14 UTC
Created attachment 112739 [details]
hwclock output
Comment 2 Scott Harvey 2018-05-18 20:57:30 UTC
If someone in authority (and another timezone) can confirm this I'll see if I can patch it.
Comment 3 Scott Harvey 2018-05-22 21:26:13 UTC
Appears to be a bug within Qt (QDate not functioning properly). May not be fixable at this time.
Comment 4 Nate Graham 2018-05-22 21:29:57 UTC
If it's a Qt bug, we need a Qt bug report. :) Can you find or file one? Thanks!
Comment 5 Scott Harvey 2018-05-22 21:32:06 UTC
I'll ask Fabian to file one. He's the one who actually did all the digging and reported that "QDate is basically FUBAR". I'm just doing the housekeeping. :)
Comment 6 Fabian Vogt 2018-05-23 06:53:09 UTC
(In reply to Scott Harvey from comment #5)
> I'll ask Fabian to file one. He's the one who actually did all the digging
> and reported that "QDate is basically FUBAR". I'm just doing the
> housekeeping. :)

It got reported for Qt 5.0.2 already, after my ping the priority got bumped from "Low" to "Somewhat important" :-/
Comment 7 Christoph Feck 2018-06-03 11:57:37 UTC
*** Bug 393975 has been marked as a duplicate of this bug. ***
Comment 8 Christoph Feck 2018-06-03 11:58:16 UTC
https://phabricator.kde.org/D13222
Comment 9 Rog131 2018-06-03 18:03:35 UTC
*** Bug 394995 has been marked as a duplicate of this bug. ***
Comment 10 Fabian Vogt 2018-06-04 08:33:22 UTC
Git commit d15f0fa8322dc2632f15024457bea41e7dd058d7 by Fabian Vogt.
Committed on 04/06/2018 at 08:33.
Pushed by fvogt into branch 'master'.

Use QDateTime for interfacing with QML

Summary:
QDate from/to JS Date has unexpected results, so use QDateTime to have a
timezone assigned to prevent conversions. That way the date values are
consistent.

The behaviour got changed with Qt 5.11 (see the linked bug report) which
lead to plasma showing the wrong dates in the calendar.

Test Plan:
Tested with and without this patch on Qt 5.10.1 and 5.11.0.
Now the correct date is displayed for -0004 and +0001 timezones.

Reviewers: #plasma, #frameworks, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: ngraham, Zren, sharvey, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D13222

M  +13   -7    src/declarativeimports/calendar/calendar.cpp
M  +12   -5    src/declarativeimports/calendar/calendar.h

https://commits.kde.org/plasma-framework/d15f0fa8322dc2632f15024457bea41e7dd058d7
Comment 11 Antonio Rojas 2018-06-19 18:13:11 UTC
*** Bug 395620 has been marked as a duplicate of this bug. ***
Comment 12 Antonio Rojas 2018-06-20 06:56:28 UTC
*** Bug 395634 has been marked as a duplicate of this bug. ***
Comment 13 Antonio Rojas 2018-06-25 06:38:11 UTC
*** Bug 395836 has been marked as a duplicate of this bug. ***
Comment 14 Christoph Feck 2018-06-27 17:02:42 UTC
*** Bug 395464 has been marked as a duplicate of this bug. ***