title: Mysql HOUR() converts -HH to HH, is this a feature or a bug?
body: <p>If I do a query such as the following:</p>
  
  <pre><code>SELECT HOUR( TIMEDIFF('2012-08-12 02:25:00', 
                        '2012-09-14 02:25:33') ) as result
  </code></pre>
  
  <p>the result is 792, even though I'm subtracting a past data from a future date.</p>
  
  <p>If I remove <code>HOUR()</code> and do:</p>
  
  <pre><code>SELECT TIMEDIFF('2012-08-12 02:25:00', 
                  '2012-09-14 02:25:33')  as result
  </code></pre>
  
  <p>Then the value is <code>-792:00:33</code>. Therefore clearly <code>HOUR()</code> is converting -792 to 792. I've tried it with other dates and result is the same (always positive hour being returned).</p>
  
  <p><a href="http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_hour" rel="nofollow">The manual</a> doesn't say anything about this behaviour.</p>
  
  <p>Is this a bug, or is it a feature that I can rely on to be present on all recent mysql installations?</p>