From bd80a78bd164f3581d5ce88f0f2f7990c8174e2d Mon Sep 17 00:00:00 2001 From: Albrecht Lohofener Date: Mon, 16 Dec 2024 22:53:24 +0100 Subject: [PATCH] Fix wrong DAB time. Now only UTC is used. The GUI uses the system time zone to calculate the correct time. --- src/welle-gui/QML/expertviews/ServiceDetails.qml | 2 +- src/welle-gui/radio_controller.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/welle-gui/QML/expertviews/ServiceDetails.qml b/src/welle-gui/QML/expertviews/ServiceDetails.qml index 5437aea3..382c29e5 100644 --- a/src/welle-gui/QML/expertviews/ServiceDetails.qml +++ b/src/welle-gui/QML/expertviews/ServiceDetails.qml @@ -139,7 +139,7 @@ ViewBaseFrame { TextExpert { name: qsTr("DAB date and time") + ":" - text: radioController.dateTime.toUTCString() + text: radioController.dateTime.toString() } } } diff --git a/src/welle-gui/radio_controller.cpp b/src/welle-gui/radio_controller.cpp index 5823e6a1..9520e94d 100644 --- a/src/welle-gui/radio_controller.cpp +++ b/src/welle-gui/radio_controller.cpp @@ -889,9 +889,9 @@ void CRadioController::displayDateTime(const dab_date_time_t& dateTime) Date.setDate(dateTime.year, dateTime.month, dateTime.day); currentDateTime.setDate(Date); - int OffsetFromUtc = dateTime.hourOffset * 3600 + - dateTime.minuteOffset * 60; - currentDateTime.setTimeZone(QTimeZone(OffsetFromUtc)); + // int OffsetFromUtc = dateTime.hourOffset * 3600 + + // dateTime.minuteOffset * 60; + currentDateTime.setTimeZone(QTimeZone::UTC); emit dateTimeChanged(currentDateTime); }