Skip to content

Commit

Permalink
Fix Daylight savings bug in service API
Browse files Browse the repository at this point in the history
Scheduling a recording for 8PM - 9PM in New York time zone on the
day before spring forward failed with an incorrect error message
"Duration Invalid". Fixed by applying the correct time zone.
  • Loading branch information
bennettpeter committed Mar 10, 2024
1 parent fe554d2 commit 7e5e536
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/recordingrule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -960,8 +960,8 @@ bool RecordingRule::IsValid(QString &msg) const
msg = QString("Invalid start/end date/time.");
return false;
}
int secsto = QDateTime(m_startdate, m_starttime)
.secsTo(QDateTime(m_enddate, m_endtime));
qint64 secsto = QDateTime(m_startdate, m_starttime, Qt::UTC)
.secsTo(QDateTime(m_enddate, m_endtime, Qt::UTC));
if (secsto <= 0 || secsto > (8 * 3600))
{
msg = QString("Invalid duration.");
Expand Down

0 comments on commit 7e5e536

Please sign in to comment.