<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Aug 22, 2015 at 2:53 PM, Alexander Belopolsky <span dir="ltr"><<a href="mailto:alexander.belopolsky@gmail.com" target="_blank">alexander.belopolsky@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_extra">Some people on this list claimed that the following behavior is a bug:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">>>> (t + timedelta(100)).strftime('%F %T %Z%z')</div><div class="gmail_extra">'2015-11-30 17:45:51 EDT-0400'</div><div class="gmail_extra"><br></div><div class="gmail_extra">because the correct result should beĀ '2015-11-30 16:45:51 EST-0500'.</div><div class="gmail_extra"><br></div><div class="gmail_extra">My answer to that is that if you need that result, you can get it, but you have to ask for it explicitly:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">>>> (t + timedelta(100)).astimezone().strftime('%F %T %Z%z')</div><div class="gmail_extra">'2015-11-30 16:45:51 EST-0500'</div><div class="gmail_extra"><br></div><div class="gmail_extra">I don't think we can do much here other than to educate Python users.<br clear="all"></div></div></div></div></div></blockquote><div><br></div><div>It is disappointing that you still believe this, because the intention of introducing DST-aware tzinfo objects was  to be able to get the latter answer. The trick that pytz uses to obtain timeline arithmetic causes it to use only fixed-offset tzinfo objects. It's true that some platforms may not give enough information about the local timezone to do better -- but others do. There is no requirement that tzname is unique to determine all the properties of a timezone.<br></div></div><br>-- <br><div class="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div></div>