title: mysql DAYOFYEAR return different values (mysql bug with leap year)
body: <p>Mysql server 
  for </p>
  
  <pre><code>SELECT 
     DAYOFYEAR( FROM_UNIXTIME(unix_birthday, "%Y-%m-%d") ) as birthday_day,
     FROM_UNIXTIME(unix_birthday, "%Y-%m-%d") as usual_date, 
     unix_birthday
  FROM workers
  </code></pre>
  
  <p>returns</p>
  
  <pre><code>unix_birthday | usual_date | day_number
       246      | 1980-09-02 | 336690000
       245      | 1990-09-02 | 652222800
  </code></pre>
  
  <p>Why the days are different (245 and 246)?</p>