title: Proper datetime/timezone handling in Django/DRF
body: <p>I'm trying to make a proper date handling setup for my web app. I have a model that looks something like this</p>
  
  <pre><code>class Entity(models.Model):
      name = models.CharField(max_length=255)
      date = models.DateTimeField()
  </code></pre>
  
  <p>User can send a request to my DRF endpoint <code>/api/v1/entity/</code> to get a list of such entities. Now there is a requirement that user should be able to request all <code>Entity</code> objects for a single day, which is determined by the date parameter. Dates are stored in UTC in the database while users of this app are not in a UTC timezone.</p>
  
  <p>User can create an entity with the following date <code>2018-06-19T01:00:00+02:00</code>, which is stored as <code>2018-06-18T23:00:00Z</code> in the database. Now if I try to list all entities user has created for <code>2018-06-19</code> nothing's returned, but filtering by <code>2018-06-18</code> returns one entry.</p>
  
  <p>This is the code setup I'm using:
  <code>http://127.0.0.1:8000/api/v1/entity/?date=2018-06-18</code>.</p>
  
  <pre><code>def get_queryset(self):
      user = self.request.user
      entities = Entity.objects.filter(owner=user)
      date = self.request.query_params.get('date')
      if date:
          entities = entities.filter(date__date=date)
      return entities
  </code></pre>
  
  <p>So in this case the appropriate date range would be <code>2018-06-18T23:00:00Z</code> - <code>2018-06-19T23:00:00Z</code>. What's the correct approach to fetch all entities for a single day (or a date range) in user's timezone?</p>