Python unix timestamp conversion and timezone
<p>Hey all! Ive got timezone troubles.</p>

<p>I have a time stamp of 2010-07-26 23:35:03 </p>

<p>What I really want to do is subtract 15 minutes from that time.</p>

<p>My method was going to be a simple conversion to unix time, subtract the seconds and convert back. Simple right?</p>

<p>My problem is that python adjusts the returned unix time using my local timezone, currently eastern daylight savings time which I believe is GMT -4. </p>

<p>So when I do this:</p>

<pre><code> # packet[20] holds the time stamp

 unix_time_value = (mktime(packet[20].timetuple())) 
</code></pre>

<p>I get 1280201703 which is Tue, 27 Jul 2010 03:35:03. I can do this:</p>

<pre><code> unix_time_value = (mktime(packet[20].timetuple())) - (4 * 3600)
</code></pre>

<p>but now I have to check for eastern standard time which is -5 GMT and adjust the (4 * 3600) to (5 * 3600). Is there any way to tell python to not use my local timezone and just convert the darn timestamp OR is there an easy way to take packet[20] and subtract 15 minutes?</p>
