title: Python: converting date string to UTC
body: <p>I am parsing a 3rd party website HTML with dates and times which are always in UK time format, however they don't have any timezone info in the source. Converting the string to an object is easy enough using datetime.strptime(), but how do I add timezone info?</p>
  
  <p>Ultimately, I need to convert these strings to a datetime object in UTC format. The code will always run on a PC which is timezone aware, i.e. datetime.now() will return UK time.</p>
  
  <pre><code>temp = '07/12/2017 13:30'
  dt = datetime.strptime(temp, '%d/%m/%Y %H:%M')
  </code></pre>
  
  <p>Is there a nicer way to do this?</p>
  
  <pre><code>offset = datetime.now() - datetime.utcnow()
  dt -= offset</code></pre>