python - strtotime equivalent?
<p>I'm using this to convert date time strings to a unix timestamp:</p>

<pre><code>str(int(time.mktime(time.strptime(date,"%d %b %Y %H:%M:%S %Z"))))
</code></pre>

<p>However often the date structure isn't the same so I keep getting the following error message:</p>

<blockquote>
  <p>time data did not match format:  data=Tue, 26 May 2009 19:58:20 -0500  fmt=%d %b %Y %H:%M:%S %Z</p>
</blockquote>

<p>Does anyone know of any simply function to convert a string representation of a date/time to a unix timestamp in python? I really don't want to have to open a process to call a php script to echo the timestamp everytime time in a loop :)</p>
