<spanclass="hljs-meta">>>></span>dt.strftime(<spanclass="hljs-string">"%A, %dth of %B '%y, %I:%M%p %Z"</span>)
<spanclass="hljs-string">"Thursday, 14th of May '15, 11:39PM UTC+02:00"</span>
</code></pre></div>
<ul>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'%Z'</span></code> only accepts <codeclass="python hljs"><spanclass="hljs-string">'UTC/GMT'</span></code> and local timezone's code. <codeclass="python hljs"><spanclass="hljs-string">'%z'</span></code> also accepts <codeclass="python hljs"><spanclass="hljs-string">'±HH:MM'</span></code>.</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'%Z'</span></code> only accepts <codeclass="python hljs"><spanclass="hljs-string">'UTC/GMT'</span></code> and local timezone's code. <codeclass="python hljs"><spanclass="hljs-string">'%z'</span></code> also accepts <codeclass="python hljs"><spanclass="hljs-string">'±HHMM'</span></code>.</strong></li>
<li><strong>For abbreviated weekday and month use <codeclass="python hljs"><spanclass="hljs-string">'%a'</span></code> and <codeclass="python hljs"><spanclass="hljs-string">'%b'</span></code>.</strong></li>
</ul>
<div><h3id="arithmetics">Arithmetics</h3><pre><codeclass="python language-python apache hljs"><D/DT> = <D/DT> ± <TD><spanclass="hljs-comment"># Returned datetime can fall into missing hour.</span>