Bug 452888 - 24-hour config setting does not propagate to items in the "Copy to clipboard" menu
Summary: 24-hour config setting does not propagate to items in the "Copy to clipboard"...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Unclassified
Component: Digital Clock (show other bugs)
Version: 5.24.4
Platform: Debian testing Other
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-23 04:11 UTC by local10
Modified: 2022-05-10 16:50 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.25


Attachments
KDE Digital Clock widget 24-hour issue (23.97 KB, image/jpeg)
2022-04-26 21:12 UTC, local10
Details

Note You need to log in before you can comment on or make changes to this bug.
Description local10 2022-04-23 04:11:49 UTC
SUMMARY
Digital Clock widget partially fails to adhere to the 24-hour config setting. Even if the 24-hour config setting is selected the Digital Clock widget still show time in the AM/PM format when doing "RMB click on the widget > Copy to the clipboard"

STEPS TO REPRODUCE
1. Place the Digital Clock widget on the task bar
2. Open the Digital Clock widget settings and select "Time display"=24 hours
3. The Digital Clock widget will show the time in 24-hour format on the task bar but when doing doing "RMB click on the widget > Copy to the clipboard" the time is still shown in the AM/PM format.

OBSERVED RESULT
The Digital Clock widget will show the time in 24-hour format on the task bar but when doing doing "RMB click on the widget > Copy to the clipboard" the time is still shown in the AM/PM format.

EXPECTED RESULT
When doing doing "RMB click on the Digital Clock widget > Copy to the clipboard" the time should be shown in the 24-hour format.

Operating System: Debian 12 Bookworm GNU/Linux
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.16.0-6-amd64 (64-bit)
Graphics Platform: X11
Comment 1 local10 2022-04-25 05:07:50 UTC
More info:

$ locale
LANG=osa_US.UTF-8
LANGUAGE=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8
Comment 2 Nate Graham 2022-04-25 17:03:20 UTC
Can you attach a screenshot so I can see which exact menu item you're talking about? There are quite a few in that menu.
Comment 3 local10 2022-04-25 19:23:26 UTC
The menu item is called "Copy to Clipboard" and it's the very first item in the popup menu that appears when you do a RMB click on the Digital Clock widget. You can't miss it.

Attaching a screenshot is difficult as the popup menu disappears when I switch focus to a screenshot taking app, Spectacle in my case. Let me know if you absolutely can't find it without a screenshot, I'll see what can be done.
Comment 4 Nate Graham 2022-04-26 14:09:51 UTC
Yes, but which entry in the "copy to clipboard" menu specifically?

On X11, you can take a screenshot of a menu by using Spectacle's delay functionality. Set a 3 second delay, then make the menu appear.
Comment 5 local10 2022-04-26 21:12:19 UTC
Created attachment 148397 [details]
KDE Digital Clock widget 24-hour issue

OK, here's an enclosed screenshot that illustrates the issue, where

1. The vertical task bar with the Digital Clock widget on top.
2. Digital Clock widget showing 16:51 time
3. "Copy to Clipboard" menu item, you get the menu but doing a RMB click on the Digital Clock wizard (2)
4. Another popup menu that shows the problem, the time is now shown as 4:51 PM instead of 16:51 as it should've been according to the 24-hour config setting.
Comment 6 Nate Graham 2022-04-27 16:43:09 UTC
Got it, thanks. Can confirm.
Comment 7 Felipe Kinoshita 2022-05-10 16:48:48 UTC
Git commit 9dad186438311dd1ed32a4acfe10c01d7168ecb1 by Felipe Kinoshita.
Committed on 10/05/2022 at 01:19.
Pushed by fhek into branch 'master'.

applets/digital-clock: Make "Copy to Clipboard" menu follow system locale

This means that if your locale uses the 24 hour format the items
in that menu will use that format as well and vice-versa.

M  +6    -6    applets/digital-clock/plugin/clipboardmenu.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/9dad186438311dd1ed32a4acfe10c01d7168ecb1