diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-07-14 19:17:26 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-07-14 19:17:26 +0800 |
| commit | 49eef7abbfbca9f4a36870b226d5c70086f571be (patch) | |
| tree | 39805c4deb18f23644dff94bafadd89168573c74 /services | |
| parent | 794df70385ca2d5d8773c32d6a5d45e61b730363 (diff) | |
timedate: use 12 hr
fuck qt
Diffstat (limited to 'services')
| -rw-r--r-- | services/TimeDate.qml | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/services/TimeDate.qml b/services/TimeDate.qml index 9c5b8df..ff9343b 100644 --- a/services/TimeDate.qml +++ b/services/TimeDate.qml @@ -5,16 +5,7 @@ import QtQuick Singleton { id: root - readonly property string time: { - // fuck you qt give me my 12 hr time - var h = clock.date.getHours(); - var m = clock.date.getMinutes(); - var s = clock.date.getSeconds(); - h = h % 12; - if (h === 0) - h = 12; - return (h < 10 ? "0" : "") + h + ":" + (m < 10 ? "0" : "") + m + ":" + (s < 10 ? "0" : "") + s; - } + readonly property string time: Qt.formatDateTime(clock.date, "hh:mm:ss") readonly property string date: Qt.formatDateTime(clock.date, "dddd dd/MM") SystemClock { |
