<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Sep 29, 2014 at 10:04 AM, Brian J. Murrell <span dir="ltr"><<a href="mailto:brian@interlinx.bc.ca" target="_blank">brian@interlinx.bc.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mon, 2014-09-29 at 09:06 -0700, Karl Newman wrote:<br>
> I know you already found the root of your issue but I wanted to mention<br>
> that the powerpriority rules match against *program* entries, so you<br>
> wouldn't use CURDATE(), you'd use starttime (or possibly program.starttime<br>
> if it's ambiguous). And since all the mythtv times are in UTC, you'd use<br>
> CONVERT_TZ(starttime,'UTC','SYSTEM').<br>
<br>
Ahhh. Thanks!<br>
<br>
> So your full powerpriority<br>
> selectclause would look something like this:<br>
><br>
> channel.callsign = 'WWNY' AND<br>
> DAYOFWEEK(CONVERT_TZ(starttime,'UTC','SYSTEM')) = 1 AND<br>
> HOUR(CONVERT_TZ(starttime,'UTC','SYSTEM')) BETWEEN 18 AND 23<br>
<br>
That produces an error when I try to "Test" it. But this also produces<br>
an error:<br>
<br>
$ echo 'select CONVERT_TZ(CURDATE(),'UTC','SYSTEM');' | mysql -u mythtv -p**** mythconverg<br>
ERROR 1054 (42S22) at line 1: Unknown column 'UTC' in 'field list'<br>
<br>
Not sure if that's the same error as MythTV is getting because the error<br>
dialog is not very help either.<br>
<br>
Cheers,<br>
b.<br></blockquote></div><br></div><div class="gmail_extra">Oops, try 'Etc/UTC' instead (just plain 'UTC' works on my system but it appears that's not universal). Reference here: <a href="http://www.mythtv.org/wiki/MySQL_Time_Zone_Tables">http://www.mythtv.org/wiki/MySQL_Time_Zone_Tables</a><br><br></div><div class="gmail_extra">Karl<br></div></div>