Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#11405 closed Patch - Bug Fix (fixed)

mythfrontend displays unexpected 'last recorded' time for rule that never recorded

Reported by: Mike Kutner <videoguy1080@…> 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)

patch-03.txt (4.0 KB ) - added by Mike Kutner <videoguy1080@…> 13 years ago.
Patch

Download all attachments as: .zip

Change History (5)

by Mike Kutner <videoguy1080@…>, 13 years ago

Attachment: patch-03.txt added

Patch

comment:1 by danielk, 13 years ago

Milestone: unknown0.27
Owner: set to danielk
Status: newaccepted

comment:2 by David Engel <dengel@…>, 13 years ago

Resolution: fixed
Status: acceptedclosed

In 24c64a1e0bc36fc2d2dbd8d54bf30ac9fe387a85/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:3 by David Engel <dengel@…>, 13 years ago

In 750a579240c76d8921dc0a6fc24cc18860bc6817/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:4 by gigem, 13 years ago

Milestone: 0.270.26.1
Note: See TracTickets for help on using tickets.