Bug 421441 - Calendar widget highlights yesterday instead of today
Summary: Calendar widget highlights yesterday instead of today
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Calendar (show other bugs)
Version: master
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
: 423112 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-05-13 01:42 UTC by Eugene Shalygin
Modified: 2021-06-12 12:33 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Shalygin 2020-05-13 01:42:30 UTC
SUMMARY

The calendar shows the correct date, but highlights yesterday. 

STEPS TO REPRODUCE
1. Click on clock to show the calendar.
2. Click on "Today".

OBSERVED RESULT

Yesterday is highlighted.

EXPECTED RESULT

Today is highlighted.

SOFTWARE/OS VERSIONS
Operating System: Gentoo 
KDE Plasma Version: 5.18.80
KDE Frameworks Version: 5.71.0
Qt Version: 5.15.0 RC
Kernel Version: 5.6.11-gentoo
OS Type: 64-bit
Comment 1 Eugene Shalygin 2020-06-14 14:08:23 UTC
The bug is connected with another one with the calendar system: it fails to read local timezone. The widget says my local timezone is UTC, but the data command knows it is CEST. Naturally,
$ stat /etc/localtime
File: /etc/localtime -> ../usr/share/zoneinfo/Europe/Berlin

Once I set the time zone in systemsettings to a correct value, the calendar widget highlights the correct date.

Thus, there are three problems:
1. KDE can't read timezone from /etc/localtime
2. The calendar widgets uses two inconsistent methods to obtain the current date, one for the text label and another one to highlight a cell in the widget.
3. The method used for the widget returns invalid dates if KDE doesn't know current time zone.
Comment 2 Eugene Shalygin 2020-06-14 14:09:34 UTC
(In reply to Eugene Shalygin from comment #1)
> ... but the data command

The "date" command.
Comment 3 Patrick Silva 2020-06-18 02:19:40 UTC
*** Bug 423112 has been marked as a duplicate of this bug. ***
Comment 5 Patrick Silva 2021-06-11 19:27:15 UTC
I can't reproduce this bug with the new calendar.
Can you reproduce with newer versions of Plasma and frameworks Eugene?
Comment 6 Eugene Shalygin 2021-06-12 10:36:41 UTC
On Gentoo with the patched qtcore everything seems to be working fine now.
Comment 7 Patrick Silva 2021-06-12 12:33:00 UTC
Thanks for the feedback.