Skip to content

Commit

Permalink
Fix wrong DAB time. Now only UTC is used. The GUI uses the system tim…
Browse files Browse the repository at this point in the history
…e zone to calculate the correct time.
  • Loading branch information
AlbrechtL committed Dec 16, 2024
1 parent b392a5a commit bd80a78
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/welle-gui/QML/expertviews/ServiceDetails.qml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ ViewBaseFrame {

TextExpert {
name: qsTr("DAB date and time") + ":"
text: radioController.dateTime.toUTCString()
text: radioController.dateTime.toString()
}
}
}
6 changes: 3 additions & 3 deletions src/welle-gui/radio_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit bd80a78

Please sign in to comment.