title: Django filter by month and year
body: <p>I am trying to filter a datetime field by month and year. For some unknown reason when entering both month and year I get back an empty set returned.</p>
  <p>Model:</p>
  <pre><code>class SomePost(model.Models):
      timestamp = models.DateTimeField(auto_now_add=True)
  </code></pre>
  <p>Query:</p>
  <pre><code>p = SomePost.objects.filter(timestamp__year=2014, timestamp__month=1)
  </code></pre>
  <p>I think it is something to do with the month but I just cannot see what i am doing wrong.</p>
  <h1>Edit</h1>
  <p>Okay so I converted the model datetimefield into a datefield and the query worked.</p>
  <p>The resulting sql was something like this:</p>
  <pre><code>SELECT 
  `a_post`.`id`, 
  `a_post`.`title`, 
  `a_post`.`slug`, 
  `a_post`.`text`, 
  `a_post`.`timestamp`, 
  `a_post`.`published` FROM `a_post` 
  WHERE EXTRACT(MONTH FROM `a_post`.`timestamp`) = 2
  ORDER BY `a_post`.`timestamp` DESC;
  </code></pre>
  <p>But when i converted it back into a datetimefield the sql was:</p>
  <pre><code>SELECT 
  `a_post`.`id`, 
  `a_post`.`title`,
  `a_post`.`slug`, 
  `a_post`.`text`, 
  `a_post`.`timestamp`,
   `a_post`.`published` FROM `a_post` 
  WHERE EXTRACT(MONTH FROM CONVERT_TZ(`a_post`.`timestamp`, 'UTC', UTC)) = 1 
  ORDER BY `a_post`.`timestamp` DESC
  </code></pre>
  <p>It appears as though the conver_tz is causing the issue. If I was to remove the convert_tz function when the query will return results.</p>
  <p>Any ideas on whats going on here?</p>