Skip to content

Commit 1a99f69

Browse files
Date/Time cleanup of ManualSchedule.
1 parent 00f505d commit 1a99f69

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

mythtv/programs/mythfrontend/manualschedule.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ bool ManualSchedule::Create(void)
100100
m_startdateList->SetItemCurrent(m_startdateList->GetCount() - 1);
101101
}
102102

103-
QTime thisTime = m_nowDateTime.time();
103+
QTime thisTime = m_nowDateTime.toLocalTime().time();
104104
thisTime = thisTime.addSecs((30 - (thisTime.minute() % 30)) * 60);
105105

106106
if (thisTime < QTime(0,30))
@@ -188,9 +188,10 @@ void ManualSchedule::dateChanged(void)
188188
// Note we allow start times up to one hour in the past so
189189
// if it is 20:25 the user can start a recording at 20:30
190190
// by first setting the hour and then the minute.
191-
QDateTime tmp = QDateTime(m_startDateTime.date(),
192-
QTime(m_startDateTime.time().hour(),59,59),
193-
Qt::UTC);
191+
QDateTime tmp = QDateTime(
192+
m_startDateTime.toLocalTime().date(),
193+
QTime(m_startDateTime.toLocalTime().time().hour(),59,59),
194+
Qt::LocalTime).toUTC();
194195
if (tmp < m_nowDateTime)
195196
{
196197
hr = m_nowDateTime.toLocalTime().time().hour();

0 commit comments

Comments
 (0)