title: Python checking daytime
body: <p>Basically, I want my script to pause between 4 and 5 AM. The only way to do this I've come up with so far is this:</p>
  
  <pre><code>seconds_into_day = time.time() % (60*60*24)
  if 60*60*4 &lt; seconds_into_day &lt; 60*60*5:
      sleep(time_left_till_5am)
  </code></pre>
  
  <p>Any "proper" way to do this? Aka some built-in function/lib for calculating time; rather than just using seconds all the time?</p>