Opened 11 years ago
Closed 11 years ago
Last modified 11 years ago
#11405 closed Patch - Bug Fix (fixed)
mythfrontend displays unexpected 'last recorded' time for rule that never recorded
Reported by: | Owned by: | danielk | |
---|---|---|---|
Priority: | minor | Milestone: | 0.26.1 |
Component: | MythTV - General | Version: | Master Head |
Severity: | low | Keywords: | last recorded |
Cc: | Ticket locked: | no |
Description
master head (c0bc92822fe63221ad8fc5cf52a6e661b37b6f21)
Create a recording rule for a television program. Look in the Manage Recordings -> Recording Rules display. See that the "Last Recorded" time is "4:00pm" but should be "never" or blank. (Note that the time displayed varies depending on the current time zone.)
Last recorded info is set into DB record in file recordingrule.cpp. Member variable is initialized in the constructor at line 68 by m_lastRecorded(MythDate::fromString("0000-00-00T00:00:00")). MythDate calls QDateTime::fromString(dtstr, Qt::ISODate) which creates the QDateTime with null date. So it looks like the intention is to create an invalid QDateTime.
In MythDate::toString(const QDateTime &raw_dt, uint format) see that
raw_dt.time() = "00:00:00" localtime.time() = raw_dt.time().toLocalTime() = "16:00:00" localtime.time().isValid() = true
however
raw_dt.isNull() = false raw_dt.isValid = false
Conclude that need protection when display the invalid date/time. Add branches in mythfrontend/programrecpriority.cpp. Please see the attached patch.
Note that mythweb displays last recorded as "0000-00-00 00:00:00" for rules that have never recorded.
Attachments (1)
Change History (5)
Changed 11 years ago by
Attachment: | patch-03.txt added |
---|
comment:1 Changed 11 years ago by
Milestone: | unknown → 0.27 |
---|---|
Owner: | set to danielk |
Status: | new → accepted |
comment:2 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
comment:4 Changed 11 years ago by
Milestone: | 0.27 → 0.26.1 |
---|
Patch