Python Datetime : use strftime() with a timezone-aware date : <p>Suppose I have date <code>d</code> like this : </p>

<pre><code>&gt;&gt;&gt; d 
datetime(2009, 4, 19, 21, 12, tzinfo=tzoffset(None, -7200))
</code></pre>

<p>As you can see, it is "timezone aware", there is an offset of 2 Hour, utctime is </p>

<pre><code>&gt;&gt;&gt; d.utctimetuple() 
time.struct_time(tm_year=2009, tm_mon=4, tm_mday=19, 
                 tm_hour=23, tm_min=12, tm_sec=0, 
                 tm_wday=6, tm_yday=109, tm_isdst=0)
</code></pre>

<p>So, real UTC date is 19th March 2009 <strong>23</strong>:12:00, right ? </p>

<p>Now I need to format my date in string, I use </p>

<pre><code>&gt;&gt;&gt; d.strftime('%Y-%m-%d %H:%M:%S.%f') 
'2009-04-19 21:12:00.000000'
</code></pre>

<p>Which doesn't seems to take this offset into account. How to fix that ? </p>
