From c04699accf5e09ed22a4c934881e1d54f7c10779 Mon Sep 17 00:00:00 2001 From: Vantesh <121645908+Vantesh@users.noreply.github.com> Date: Tue, 26 Aug 2025 03:03:31 +0300 Subject: [PATCH 1/3] Update time format to HH:MM (e.g. 03:00) --- Modules/CentcomCenter/Events.qml | 2 +- Modules/Lock/LockScreenContent.qml | 4 ++-- Modules/TopBar/Clock.qml | 4 ++-- Services/NotificationService.qml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Modules/CentcomCenter/Events.qml b/Modules/CentcomCenter/Events.qml index ec85786e..17e057ed 100644 --- a/Modules/CentcomCenter/Events.qml +++ b/Modules/CentcomCenter/Events.qml @@ -250,7 +250,7 @@ Rectangle { if (modelData.allDay) { return "All day" } else { - let timeFormat = SettingsData.use24HourClock ? "H:mm" : "h:mm AP" + let timeFormat = SettingsData.use24HourClock ? "HH:mm" : "hh:mm AP" let startTime = Qt.formatTime( modelData.start, timeFormat) if (modelData.start.toDateString( diff --git a/Modules/Lock/LockScreenContent.qml b/Modules/Lock/LockScreenContent.qml index fcfcfd8d..fde540b4 100644 --- a/Modules/Lock/LockScreenContent.qml +++ b/Modules/Lock/LockScreenContent.qml @@ -92,9 +92,9 @@ Item { anchors.top: parent.top text: SettingsData.use24HourClock ? Qt.formatTime( systemClock.date, - "H:mm") : Qt.formatTime( + "HH:mm") : Qt.formatTime( systemClock.date, - "h:mm AP") + "hh:mm AP") font.pixelSize: 120 font.weight: Font.Light color: "white" diff --git a/Modules/TopBar/Clock.qml b/Modules/TopBar/Clock.qml index bac1e387..3e2f1e12 100644 --- a/Modules/TopBar/Clock.qml +++ b/Modules/TopBar/Clock.qml @@ -39,8 +39,8 @@ Rectangle { StyledText { text: SettingsData.use24HourClock ? Qt.formatTime( root.currentDate, - "H:mm") : Qt.formatTime( - root.currentDate, "h:mm AP") + "HH:mm") : Qt.formatTime( + root.currentDate, "hh:mm AP") font.pixelSize: Theme.fontSizeMedium - 1 color: Theme.surfaceText anchors.verticalCenter: parent.verticalCenter diff --git a/Services/NotificationService.qml b/Services/NotificationService.qml index 476812c4..90d4f2a6 100644 --- a/Services/NotificationService.qml +++ b/Services/NotificationService.qml @@ -310,7 +310,7 @@ Singleton { if (use24Hour) { return date.toLocaleTimeString(Qt.locale(), "HH:mm") } else { - return date.toLocaleTimeString(Qt.locale(), "h:mm AP") + return date.toLocaleTimeString(Qt.locale(), "hh:mm AP") } } From bb81378b20b14181c95ea4e097cb87e1aa195484 Mon Sep 17 00:00:00 2001 From: Vantesh <121645908+Vantesh@users.noreply.github.com> Date: Tue, 26 Aug 2025 03:07:36 +0300 Subject: [PATCH 2/3] feat: Use HH:MM format for 24hr clock system only --- Modules/CentcomCenter/Events.qml | 2 +- Modules/Lock/LockScreenContent.qml | 2 +- Modules/TopBar/Clock.qml | 2 +- Services/NotificationService.qml | 2 +- Services/WallpaperCyclingService.qml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Modules/CentcomCenter/Events.qml b/Modules/CentcomCenter/Events.qml index 17e057ed..b79bed0a 100644 --- a/Modules/CentcomCenter/Events.qml +++ b/Modules/CentcomCenter/Events.qml @@ -250,7 +250,7 @@ Rectangle { if (modelData.allDay) { return "All day" } else { - let timeFormat = SettingsData.use24HourClock ? "HH:mm" : "hh:mm AP" + let timeFormat = SettingsData.use24HourClock ? "HH:mm" : "h:mm AP" let startTime = Qt.formatTime( modelData.start, timeFormat) if (modelData.start.toDateString( diff --git a/Modules/Lock/LockScreenContent.qml b/Modules/Lock/LockScreenContent.qml index fde540b4..32a7014c 100644 --- a/Modules/Lock/LockScreenContent.qml +++ b/Modules/Lock/LockScreenContent.qml @@ -94,7 +94,7 @@ Item { systemClock.date, "HH:mm") : Qt.formatTime( systemClock.date, - "hh:mm AP") + "h:mm AP") font.pixelSize: 120 font.weight: Font.Light color: "white" diff --git a/Modules/TopBar/Clock.qml b/Modules/TopBar/Clock.qml index 3e2f1e12..918e9233 100644 --- a/Modules/TopBar/Clock.qml +++ b/Modules/TopBar/Clock.qml @@ -40,7 +40,7 @@ Rectangle { text: SettingsData.use24HourClock ? Qt.formatTime( root.currentDate, "HH:mm") : Qt.formatTime( - root.currentDate, "hh:mm AP") + root.currentDate, "h:mm AP") font.pixelSize: Theme.fontSizeMedium - 1 color: Theme.surfaceText anchors.verticalCenter: parent.verticalCenter diff --git a/Services/NotificationService.qml b/Services/NotificationService.qml index 90d4f2a6..476812c4 100644 --- a/Services/NotificationService.qml +++ b/Services/NotificationService.qml @@ -310,7 +310,7 @@ Singleton { if (use24Hour) { return date.toLocaleTimeString(Qt.locale(), "HH:mm") } else { - return date.toLocaleTimeString(Qt.locale(), "hh:mm AP") + return date.toLocaleTimeString(Qt.locale(), "h:mm AP") } } diff --git a/Services/WallpaperCyclingService.qml b/Services/WallpaperCyclingService.qml index 54c1e966..7cf83561 100644 --- a/Services/WallpaperCyclingService.qml +++ b/Services/WallpaperCyclingService.qml @@ -115,7 +115,7 @@ Singleton { } function checkTimeBasedCycling() { - const currentTime = Qt.formatTime(systemClock.date, "hh:mm") + const currentTime = Qt.formatTime(systemClock.date, "h:mm") if (currentTime === cachedCyclingTime && currentTime !== lastTimeCheck) { From 42c006fb2cfef3731c6602d4c917151468b25971 Mon Sep 17 00:00:00 2001 From: Vantesh <121645908+Vantesh@users.noreply.github.com> Date: Tue, 26 Aug 2025 03:17:15 +0300 Subject: [PATCH 3/3] Revert time format to HH:MM in checkTimeBasedCycling function --- Services/WallpaperCyclingService.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Services/WallpaperCyclingService.qml b/Services/WallpaperCyclingService.qml index 7cf83561..54c1e966 100644 --- a/Services/WallpaperCyclingService.qml +++ b/Services/WallpaperCyclingService.qml @@ -115,7 +115,7 @@ Singleton { } function checkTimeBasedCycling() { - const currentTime = Qt.formatTime(systemClock.date, "h:mm") + const currentTime = Qt.formatTime(systemClock.date, "hh:mm") if (currentTime === cachedCyclingTime && currentTime !== lastTimeCheck) {