mirror of
https://gitee.com/openharmony/applications_systemui
synced 2024-12-28 02:45:18 +00:00
I9NIG3【OpenHarmony 4.1.7.7】【应用子系统】【RK3568】【必现_5/5】设置24小时制时间,状态栏和通知中心依然显示12小时制
Signed-off-by: 王环 <18108170464@163.com>
This commit is contained in:
parent
41bfb09f3e
commit
28e798cfe5
@ -23,6 +23,7 @@ import createOrGet from "./SingleInstanceHelper";
|
||||
import { obtainLocalEvent } from "./event/EventUtil";
|
||||
import Constants from "./Constants";
|
||||
import { CommonEventManager, getCommonEventManager, POLICY } from "./commonEvent/CommonEventManager";
|
||||
import i18n from '@ohos.i18n';
|
||||
|
||||
export const TIME_CHANGE_EVENT = "Time_Change_Event";
|
||||
|
||||
@ -73,6 +74,7 @@ class TimeManager {
|
||||
}
|
||||
|
||||
public formatTime(date: Date) {
|
||||
this.mUse24hFormat = i18n.System.is24HourClock();
|
||||
return concatTime(date.getHours() % (this.mUse24hFormat ? 24 : 12), date.getMinutes());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user