summaryrefslogtreecommitdiff
path: root/lib/RHRD
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2019-04-03 11:46:31 (GMT)
committerChristian Pointner <equinox@helsinki.at>2019-04-03 11:46:31 (GMT)
commitddbeed2ac88b4d88e3c8745fa72553f59ccc3da8 (patch)
tree912d1b9dc20ad1befaa1f0ec2f26df01b4588df4 /lib/RHRD
parentc0fa00419d8d7826e180f52c9b91bdc2b93b5a13 (diff)
added workaround for DST shortcommings of Rivendell
Diffstat (limited to 'lib/RHRD')
-rwxr-xr-xlib/RHRD/rddb.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/RHRD/rddb.pm b/lib/RHRD/rddb.pm
index 66ae89b..3a01761 100755
--- a/lib/RHRD/rddb.pm
+++ b/lib/RHRD/rddb.pm
@@ -1324,8 +1324,21 @@ sub create_or_update_schedule_log
return (undef, $status, $errorstring);
}
+ my $dst_dummy2 = 0;
+ my $dst_dummy3 = 0;
my @carts = ();
for my $show (@shows) {
+ ## Rivendell is incredibly stupid and does not handle daylight savings time at all.
+ ## To fix we add a dummy show id to resync with real time at 2:00 and 3:00 in the
+ ## morning, (Macro 20 is updating the display of the current week in RDAirplay)
+ if($dst_dummy2 == 0 && $show->{'START_TIME'} >= 7200) {
+ push @carts, { NUMBER => 20, START_TIME => 7200000, TRANS_TYPE => 2, TIME_TYPE => 1 };
+ $dst_dummy2 = 1;
+ }
+ if($dst_dummy3 == 0 && $show->{'START_TIME'} >= 10800) {
+ push @carts, { NUMBER => 20, START_TIME => 10800000, TRANS_TYPE => 2, TIME_TYPE => 1 };
+ $dst_dummy3 = 1;
+ }
push @carts, { NUMBER => $show->{'ID'}, START_TIME => $show->{'START_TIME'}*1000, TRANS_TYPE => 2, TIME_TYPE => 1 };
}
@@ -1375,6 +1388,8 @@ sub get_schedule_log
my @show_dbs;
while(my ($start_time, $cart_number) = $sth->fetchrow_array()) {
+ next if ($cart_number == 20); ## Daylight Savings Hack
+
my $entry = {};
$entry->{'ID'} = $cart_number;
my ($title, $len, $status, $errorstring) = get_show_title_and_len($ctx, $cart_number);