Bug 408662

Summary: Proper time formatting for locales where AMPM is going in front of time value
Product: [Plasma] plasmashell Reporter: Shinjo Park <kde>
Component: Digital Clock widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: minor CC: momo.cao, nate
Priority: NOR    
Version First Reported In: master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=393956
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Shinjo Park 2019-06-13 19:52:21 UTC
SUMMARY

On certain locales like Korean, time in 12-hour format has AM/PM indicator prefixed to the time value like AM 12:00. Currently digital clock applet does not support such situation.

STEPS TO REPRODUCE
1. Set locale to ko_KR (or other locale where 12-hour time format is AP hh:mm
2. Set digital clock to 12-hour mode
3. See the clock

OBSERVED RESULT
AM/PM indicator goes after time value (in example for Korean: 12:00 오전)

EXPECTED RESULT
AM/PM indicator goes in front of time value (in example for Korean: 오전 12:00)

SOFTWARE/OS VERSIONS
I checked the source code of master, function timeFormatCorrection(timeFormatString) of contents/ui/DigitalClock.qml hardcodes AM/PM indicator after the time value.
Comment 1 momo 2021-05-09 18:08:08 UTC
Hello Shinjo. Do you know if there's a resource that lists locales that show AM/PM this way? I've been looking at CLDR (http://cldr.unicode.org/translation/date-time-1/date-time-patterns) but I cannot find data about the AM/PM order.
Comment 2 Shinjo Park 2021-05-17 16:03:35 UTC
(In reply to momo from comment #1)
> Hello Shinjo. Do you know if there's a resource that lists locales that show
> AM/PM this way? I've been looking at CLDR
> (http://cldr.unicode.org/translation/date-time-1/date-time-patterns) but I
> cannot find data about the AM/PM order.

"hour minute" of the CLDR Date/Time Chart [1] or "hm"/"hms" formatting of "Date & Time" should be suffice.

[1] https://unicode-org.github.io/cldr-staging/charts/latest/verify/dates/ko.html
[2] https://st.unicode.org/cldr-apps/v#/ko/Gregorian/6cdad6946fa0fe82
Comment 3 Nate Graham 2021-08-29 21:17:33 UTC
Can confirm. When forcing or inheriting 12-hour style, we assume that the AM/PM does after the time. I wonder if we can detect this from the locale...
Comment 4 pallaswept 2025-02-26 14:01:54 UTC
We also assume seconds to the right of minutes to the right of hours (LTR style)

Fix incoming