title: "import time" and "from datetime import time" together?
body: <p>I have a piece of code in my <code>view.py</code> that works if I use <code>from datetime import time</code>:</p>
  
  <p>Working Code:</p>
  
  <pre><code>from datetime import time, ...
  
  times = []
  for i in range(0, 24*4):
      times.append((datetime.combine(date.today(), 
      time()) + timedelta(minutes=15) * i).time().strftime("%I:%M %p"))
  </code></pre>
  
  <p>Unfortunately, if I have that in place, I have another code in my <code>view.py</code> that is using <code>import time</code> to convert am/pm time to 24h db friendly format that will not work if the <code>from datetime import time</code> is in place.</p>
  
  <p>Code:</p>
  
  <pre><code>import time 
  
  mytime = time.strftime('%H:%M:%S', time.strptime(mytime, '%I:%M %p'))
  </code></pre>
  
  <p>So the questions are:</p>
  
  <ol>
  <li>is there any workaround to have both imports in place?</li>
  <li>If not, how can I make the first function to work with <code>import time</code>?</li>
  <li>Is there anther way to convert from am/pm to 24h format using <code>import datetime</code>?</li>
  </ol>