applets/digital-clock: Fix `Qt.formatDateTime` returns different date when minute changes

`Qt.formatDateTime` uses `MM` instead of `mm` to represent month number.

BUG: 436796
FIXED-IN: 5.24.3


(cherry picked from commit dbdae689ff)
wilder-5.24
Fushan Wen 4 years ago
parent 4c7c1cf1d7
commit 788f52fc9f
  1. 2
      applets/digital-clock/package/contents/ui/DigitalClock.qml

@ -673,7 +673,7 @@ Item {
if (main.showDate) {
// If the date has changed, force size recalculation, because the day name
// or the month name can now be longer/shorter, so we need to adjust applet size
var currentDate = Qt.formatDateTime(dataSource.data["Local"]["DateTime"], "yyyy-mm-dd");
const currentDate = Qt.formatDateTime(dataSource.data["Local"]["DateTime"], "yyyy-MM-dd");
if (main.lastDate !== currentDate) {
doCorrections = true;
main.lastDate = currentDate

Loading…
Cancel
Save