<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">&lt;<a href="mailto:brian@interlinx.bc.ca" target="_blank">brian@interlinx.bc.ca</a>&gt;</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>
&gt; I know you already found the root of your issue but I wanted to mention<br>
&gt; that the powerpriority rules match against *program* entries, so you<br>
&gt; wouldn&#39;t use CURDATE(), you&#39;d use starttime (or possibly program.starttime<br>
&gt; if it&#39;s ambiguous). And since all the mythtv times are in UTC, you&#39;d use<br>
&gt; CONVERT_TZ(starttime,&#39;UTC&#39;,&#39;SYSTEM&#39;).<br>
<br>
Ahhh.  Thanks!<br>
<br>
&gt; So your full powerpriority<br>
&gt; selectclause would look something like this:<br>
&gt;<br>
&gt; channel.callsign = &#39;WWNY&#39; AND<br>
&gt; DAYOFWEEK(CONVERT_TZ(starttime,&#39;UTC&#39;,&#39;SYSTEM&#39;)) = 1 AND<br>
&gt; HOUR(CONVERT_TZ(starttime,&#39;UTC&#39;,&#39;SYSTEM&#39;)) BETWEEN 18 AND 23<br>
<br>
That produces an error when I try to &quot;Test&quot; it.  But this also produces<br>
an error:<br>
<br>
$ echo &#39;select CONVERT_TZ(CURDATE(),&#39;UTC&#39;,&#39;SYSTEM&#39;);&#39; | mysql -u mythtv -p**** mythconverg<br>
ERROR 1054 (42S22) at line 1: Unknown column &#39;UTC&#39; in &#39;field list&#39;<br>
<br>
Not sure if that&#39;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 &#39;Etc/UTC&#39; instead (just plain &#39;UTC&#39; works on my system but it appears that&#39;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>