From 206b01a2d14c2fa17698befba9eb34a186123f88 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Fri, 4 Aug 2017 13:38:48 -0700 Subject: [PATCH] Qt: Fix timezone issues with time overrides --- CHANGES | 1 + src/platform/qt/SensorView.cpp | 4 ++-- src/platform/qt/SensorView.ui | 3 --- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index 9ef3d4b36..7e9717633 100644 --- a/CHANGES +++ b/CHANGES @@ -15,6 +15,7 @@ Bugfixes: - GB MBC: Fix RTC loading when file size is off - GB Serialize: Fix deserializing video STAT - GB, GBA Savedata: Fix savestate-related save overwriting (fixes mgba.io/i/834) + - Qt: Fix timezone issues with time overrides Misc: - Qt: Don't rebuild library view if style hasn't changed - SDL: Fix 2.0.5 build on macOS under some circumstances diff --git a/src/platform/qt/SensorView.cpp b/src/platform/qt/SensorView.cpp index 8f107df46..c33abbf52 100644 --- a/src/platform/qt/SensorView.cpp +++ b/src/platform/qt/SensorView.cpp @@ -28,10 +28,10 @@ SensorView::SensorView(GameController* controller, InputController* input, QWidg connect(m_ui.timeNoOverride, &QAbstractButton::clicked, controller, &GameController::setRealTime); connect(m_ui.timeFixed, &QRadioButton::clicked, [controller, this] () { - controller->setFixedTime(m_ui.time->dateTime()); + controller->setFixedTime(m_ui.time->dateTime().toUTC()); }); connect(m_ui.timeFakeEpoch, &QRadioButton::clicked, [controller, this] () { - controller->setFakeEpoch(m_ui.time->dateTime()); + controller->setFakeEpoch(m_ui.time->dateTime().toUTC()); }); connect(m_ui.time, &QDateTimeEdit::dateTimeChanged, [controller, this] (const QDateTime&) { m_ui.timeButtons->checkedButton()->clicked(); diff --git a/src/platform/qt/SensorView.ui b/src/platform/qt/SensorView.ui index 1289d67aa..d75b5329d 100644 --- a/src/platform/qt/SensorView.ui +++ b/src/platform/qt/SensorView.ui @@ -96,9 +96,6 @@ MM/dd/yy hh:mm:ss AP - - Qt::UTC -