Python 2.7.9 Getting error:TypeError: argument must be 9-item sequence, not datetime.datetime
<p>This is occurring on the following code line:</p>

<p><code>epoch_time = int(time.mktime(time.strptime( time.strftime( "%Y-%m-%d %H:%M:%S", status.sensorBGLTimestamp ), '%Y-%m-%d %H:%M:%S').timetuple()) - time.timezone )</code></p>

<p>Anyone able to help with why?</p>

<p>If you are trying to simply get the epoch time, you should use</p>

<pre><code>import calendar
import time

calendar.timegm(time.gmtime())
</code></pre>

<p><strong>Returns:</strong>
<code>1473881423</code></p>

python datetime time