title: Compare date and datetime in Django
body: <p>I have a  model with a datetime field:</p>
  
  <pre><code>class MyModel(models.Model):
      created = models.DateTimeField(auto_now = True)
  </code></pre>
  
  <p>I want to get all the records created today.</p>
  
  <p>I tried: </p>
  
  <pre><code>MyModel.objects.all().filter(created = timezone.now())
  </code></pre>
  
  <p>and</p>
  
  <pre><code>MyModel.objects.all().filter(created = timezone.now().date())
  </code></pre>
  
  <p>But always got an empty set. What is the correct way in Django to do this?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>It looks strange, but a record, created today (06.04.2012 23:09:44) has date (2012-04-07 04:09:44) in the database. When I'm trying to edit it in the admin panel it looks correct (06.04.2012 23:09:44). Does Django handle it somehow?</p>