https://bugs.kde.org/show_bug.cgi?id=511478
Bug ID: 511478
Summary: Lack leading zero when use 24H format
Classification: Plasma
Product: plasmashell
Version First master
Reported In:
Platform: Arch Linux
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: Digital Clock widget
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: 1.0
SUMMARY
Across all region defaults, there's usually a leading zero with 24H time format
(maybe not all). But Digital Clock widget doesn't have one.
STEPS TO REPRODUCE
1. In System Settings - Region & Language - Time, select a 12H format, e.g.
American English (United States)
2. In Digital Clock Settings - Appearance, set Time Display to 24-Hour
OBSERVED RESULT
There's no leading zero in hours.
EXPECTED RESULT
There should(?) be a leading zero when time is between 00~09
ADDITIONAL INFORMATION
In DigitalClock.qml, function timeFormatCorrection gets the system time format
with `Qt.locale().timeFormat(Locale.ShortFormat))`, and when it's a region
using 12H format the result is always `h:***`. When a user set Time Display to
24H in the widget settings, the format string (h:***) keeps.
Possible solutions:
1. View the 24-Hour option as an user-selected time format beyond the system
settings. Force the format string to be "hh:mm".
2. Or, replace h to hh when 24-Hour is enabled.
3. Or, add options to allow user to custom time format, just like the custom
date.
--
You are receiving this mail because:
You are watching all bug changes.