Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#12175 closed Bug Report - General (fixed)

"This time" filter only matches shows that are later than original schedule time

Reported by: tuxtiger@… Owned by: gigem
Priority: minor Milestone: 0.27.2
Component: MythTV - Scheduling Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

The filter calculates the difference in minutes between the scheduled time and the airtime. If the airtime is n days + 9 minutes later, the MOD1140 will result in 9 which is smaller than 10.

If the show however is 1 minute earlier...the result of the query is 1339 which is of course not smaller than 10.

The query should also check if result >= 1440 - 10 I think? Proposed query: 1430 <= ABS(TIMESTAMPDIFF(MINUTE, CONVERT_TZ( ADDTIME(RECTABLE.startdate, RECTABLE.starttime), 'Etc/UTC', 'SYSTEM'), CONVERT_TZ(program.starttime, 'Etc/UTC', 'SYSTEM'))) MOD 1440 <= 10

db schema: 1317

test query: SELECT ABS( TIMESTAMPDIFF( MINUTE , CONVERT_TZ( "2014-06-12 18:08:00", 'Etc/UTC', 'SYSTEM' ) , CONVERT_TZ( "2014-06-13 18:07:00", 'Etc/UTC', 'SYSTEM' ) ) ) MOD1440

Change History (4)

comment:1 Changed 5 years ago by tuxtiger@…

The query should be:

NOT ABS(TIMESTAMPDIFF(MINUTE, CONVERT_TZ( ADDTIME(RECTABLE.startdate, RECTABLE.starttime), 'Etc/UTC', 'SYSTEM'), CONVERT_TZ(program.starttime, 'Etc/UTC', 'SYSTEM'))) MOD 1440 BETWEEN 11 AND 1429

confirmed to be working in my myth

comment:2 Changed 5 years ago by David Engel <dengel@…>

Resolution: fixed
Status: newclosed

In 762e630e9a4f3e8787807ae82b8760c0943e4d0d/mythtv:

Fix a thinko in the 'This time' and 'This day and time' filters.

Fixes #12175

comment:3 Changed 5 years ago by David Engel <dengel@…>

In aa822f562b24ca5d199941835e33b78eed98a94d/mythtv:

Fix a thinko in the 'This time' and 'This day and time' filters.

This is a rework of commit 762e630e from master for the fixes/0.27
branch. It accomplishes the same fix if needed, but does so without
updating the schema.

Fixes #12175

comment:4 Changed 5 years ago by gigem

Milestone: unknown0.27.2
Note: See TracTickets for help on using tickets.