title: How do I compare DateTime objects to UNIX timestamps when filtering results in django?
body: <p>I am using the FullCalendar plugin for JQuery.</p>
  
  <p>This plugin passes a unix timestamp to a url (both start and end times), which is then used to query the event objects in the database and pull out events which fall within the range of start-end.</p>
  
  <p>However, I keep getting a validation error because the times in my database are stored as datetimes and the value I am comparing them to is a UNIX timestamp.</p>
  
  <p>How can I compare these two dates when running a query?</p>
  
  <pre><code>def fetch_events(request):
      start = request.GET.get('start')
      end = request.GET.get('end')
      e = Event.objects.filter(start__gte=start, end__lte=end).values('id','title','start','end')
      data = simplejson.dumps(list(e), cls=DjangoJSONEncoder)
      return HttpResponse(data)
  </code></pre>