title: alternative to total_seconds() in python 2.6
body: <p>In python 2.7 there is the total_seconds() method. </p>
  
  <p>In python 2.6, it doesn't exist and it suggests to use</p>
  
  <pre><code>(td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) / 10**6
  </code></pre>
  
  <p>Could somebody show me how to implement it below?</p>
  
  <p>Thanks</p>
  
  <pre><code>import datetime
  
  timestamp = '2014-10-24 00:00:00'
  timestamp = int((datetime.datetime.strptime(timestamp, '%Y-%m-%d %H:%M:%S') - datetime.datetime(1970,1,1)).total_seconds())
  print timestamp
  
  timestamp = '2014-10-24 00:00:00'
  timestamp = datetime.datetime.strptime(timestamp, '%Y-%m-%d %H:%M:%S') - datetime.datetime(1970,1,1)
  print timestamp
  </code></pre>