Bug 408662 - Proper time formatting for locales where AMPM is going in front of time value
Summary: Proper time formatting for locales where AMPM is going in front of time value
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Digital Clock widget (other bugs)
Version First Reported In: master
Platform: Other Linux
: NOR minor
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-13 19:52 UTC by Shinjo Park
Modified: 2025-02-26 14:01 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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