linuxmint / cinnamon

A Linux desktop featuring a traditional layout, built from modern technology and introducing brand new innovative features.
GNU General Public License v2.0
4.4k stars 722 forks source link

calendar@cinnamon.org if set to show seconds only in tooltip, the second doesn't tick properly #12140

Open billyswong opened 1 month ago

billyswong commented 1 month ago

Distribution

Mint 21.3 Cinnamon

Package version

cinnamon 6.0.4

Graphics hardware in use

No response

Frequency

Always

Bug description

Currently, the panel clock ticks per second if and only if the "date format" is set to contain %S in custom format. The "date format for tooltip" is ignored.

Thus if one want to hide second in panel and show it only within tooltip, the tooltip can't show a correct second.

The one who found this bug: https://forums.linuxmint.com/viewtopic.php?t=416598

Steps to reproduce

Right click the panel clock > configure > toggle on "use a custom date format" > in "date format for tooltip", put "%A, %e %B %Y, %H:%M:%S".

Then move the mouse to the panel clock and see the tooltip misreporting the second.

Expected behavior

The clock shall update itself per second if any one of the two custom date formats includes second.

Additional information

I tried to fix this bug myself. The fix seems to work but I am not sure if it is quality enough for merging. Take it as a proof of concept. applet.js.txt

p.s. Github disallows me to upload the file with its original name as-is, thus the additional .txt

TClockBroughtMeHere commented 1 month ago

Ditto, just tried to enable this in the clock tooltip.