https://bugs.kde.org/show_bug.cgi?id=370306

            Bug ID: 370306
           Summary: no option to show 12-hour time without displaying the
                    AM/PM part
           Product: plasmashell
           Version: 5.8.0
          Platform: unspecified
                OS: Linux
            Status: UNCONFIRMED
          Severity: wishlist
          Priority: NOR
         Component: Digital Clock
          Assignee: plasma-b...@kde.org
          Reporter: wolft...@gmail.com

because the space used by Digital Clock is relevant to the font-size and the
fit in various contexts, the ability to hide the AM/PM part of 12-hour time is
valuable. Of course, anyone viewing local time knows whether it is morning or
evening already without the AM/PM part, so it really isn't necessary.

Reproducible: Always

Steps to Reproduce:
1. Uncheck 24-hour time
2. Notice that the 12-hour time always shows the AM/PM part and no option is
available to hide that



Here is a modification that successfully hides the AM/PM part:

In
`/usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml`,
replace
`return Qt.formatTime(currentTime, main.timeFormat);`
with
`return Qt.formatTime(currentTime, 'h:mm ap').replace(' am', '').replace(' pm',
'');`

The only trouble is that the time can now be large enough to bump into the date
when that is shown. Some additional modification should be added to ensure some
small margin between the date and time.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to