title: How do you setup simple timer between two times when the other time is the next day?
body: <p>Python noob here</p>
  
  <pre><code>from datetime import datetime, time
  now = datetime.now()
  now_time = now.time()
  
  if now_time &gt;= time(10,30) and now_time &lt;= time(13,30):
      print "yes, within the interval"
  </code></pre>
  
  <p>I would like the timer to work between 10,30 AM today and 10 AM the next day. Changing time(13,30) to time(10,00) will not work, because I need to tell python 10,00 is the next day. I should use datetime function but don't know how. Any tips or examples appreciated.</p>