Summary: | Desync between date in taskbar and real date | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Gaëtan Gilbert <gaetan.gilbert> |
Component: | Digital Clock widget | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kde, nate |
Priority: | HI | ||
Version: | 5.24.4 | ||
Target Milestone: | 1.0 | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/plasma-workspace/commit/ab86bd37adeed851e460aa7ffd74c1fba0a99b12 | Version Fixed In: | 5.24.5 |
Sentry Crash Report: | |||
Attachments: |
tooltip from mouse hover and taskbar do not agree (tooltip is correct)
~/.config/plasma-org.kde.plasma.desktop-appletsrc |
I do have a theory We call dateTimeChanged once per day It checks if the formatted date matches the last date. If not it goes into "timeFormatCorrection" which then updates the labels But the value it's using for the "only do this once per day" is potentially in a different timezone to the one used by formatting const currentDate = Qt.formatDateTime(dataSource.data["Local"]["DateTime"], "yyyy-MM-dd"); if (main.lastDate !== currentDate) { doCorrections = true; main.lastDate = currentDate } should be the current one right? Which means if my local is EU and I show UK time. it'd only update once per EU date change to the current UK date time, and be one day off. Can you attach your ~/.config/plasma-org.kde.plasma.desktop-appletsrc please ----- Also this code should be rewritten declaratively so we don't have this sort of problem! Created attachment 148158 [details]
~/.config/plasma-org.kde.plasma.desktop-appletsrc
I also have LC_TIME=fr_FR.UTF-8 in my env variables lastSelectedTimezone=Europe/Paris selectedTimeZones=Europe/Paris Which isn't the default of Local. They should still match, but maybe the dataengine isn't atomic Git commit 5430c3a029590f824419dce5774a5e10efd72df5 by Nate Graham, on behalf of David Edmundson. Committed on 21/04/2022 at 17:17. Pushed by ngraham into branch 'master'. applets/digital-clock: Fix date drift dateTimeChanged is called every second. This in turn checks if the date has changed. If so we call setupLabels which updates the clock. The date label used to use main.currentTime which is a value set in the binding of the timeLabel's text property. The order of this being updated vs running this code is undefined. Bug 1: We compare an ever so slightly different date source to the one used in the date text label. Bug 2: We are not necessarily updating the date label with the most updated time. Overall we can't mix declarative and imperative design patterns. This patch commits to being imperative and introduces a function to get the current time so that the date label and time label will always get the most up to date value even if they update from different trigers. FIXED-IN: 5.24.5 M +14 -15 applets/digital-clock/package/contents/ui/DigitalClock.qml https://invent.kde.org/plasma/plasma-workspace/commit/5430c3a029590f824419dce5774a5e10efd72df5 Git commit ab86bd37adeed851e460aa7ffd74c1fba0a99b12 by Nate Graham, on behalf of David Edmundson. Committed on 21/04/2022 at 17:37. Pushed by ngraham into branch 'Plasma/5.24'. applets/digital-clock: Fix date drift dateTimeChanged is called every second. This in turn checks if the date has changed. If so we call setupLabels which updates the clock. The date label used to use main.currentTime which is a value set in the binding of the timeLabel's text property. The order of this being updated vs running this code is undefined. Bug 1: We compare an ever so slightly different date source to the one used in the date text label. Bug 2: We are not necessarily updating the date label with the most updated time. Overall we can't mix declarative and imperative design patterns. This patch commits to being imperative and introduces a function to get the current time so that the date label and time label will always get the most up to date value even if they update from different trigers. FIXED-IN: 5.24.5 (cherry picked from commit 5430c3a029590f824419dce5774a5e10efd72df5) M +14 -15 applets/digital-clock/package/contents/ui/DigitalClock.qml https://invent.kde.org/plasma/plasma-workspace/commit/ab86bd37adeed851e460aa7ffd74c1fba0a99b12 |
Created attachment 148121 [details] tooltip from mouse hover and taskbar do not agree (tooltip is correct) SUMMARY At midnight (Paris time) the time shown in the taskbar does not change day. This seems to persist until the next day, staying 1 day behind reality. The system knows the real date: hovering over the clock shows the correct date in the tooltip (see attached screenshot), command line date produces the correct date, etc. Restarting plasmashell or going into widget edit mode resyncs, until the next day. STEPS TO REPRODUCE 1. wait until midnight OBSERVED RESULT date does not change EXPECTED RESULT date should change SOFTWARE/OS VERSIONS Linux: 5.16.0-5-amd64 (available in About System) KDE Plasma Version: 5.24.4 KDE Frameworks Version: 5.90.0 Qt Version: 5.15.2 ADDITIONAL INFORMATION This started around the daylight saving time change (27 march) but I wasn't paying attention enough to tell if that was it or if something else.