Skip to content
Commit 5430c3a0 authored by David Edmundson's avatar David Edmundson Committed by Nate Graham
Browse files

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.

BUG: 452554
FIXED-IN: 5.24.5
parent 09e9c3cc
Pipeline #166521 passed with stage
in 6 minutes and 13 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment