title: What was midnight yesterday as an epoch time?
body: <p>I'm trying to get my head around the datetime module.  I know the time now as an epoch and the time an event last happened (as an epoch time).  What I need to do is figure out whether that event happened between midnight and midnight of yesterday.</p>
  
  <pre><code>t = time.time() # is now
  t2 = 1234567890 # some arbitrary time from my log
  </code></pre>
  
  <p>24 hours ago is t - 86400, but how can I round that up and down to midnight.  I'm having real trouble finding a way to get timestamps in and out of datetime or then manipulating a datetime to set the time.</p>