<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 27, 2015 at 12:30 PM, Lennart Regebro <span dir="ltr"><<a href="mailto:regebro@gmail.com" target="_blank">regebro@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Jul 27, 2015 at 6:15 PM, Nikolaus Rath <<a href="mailto:Nikolaus@rath.org">Nikolaus@rath.org</a>> wrote:<br>
> On Jul 27 2015, Lennart Regebro <<a href="mailto:regebro@gmail.com">regebro@gmail.com</a>> wrote:<br></span></blockquote><div>(The *first* option) </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
>> That you add one hour to it, and the datetime moves forward one hour<br>
>> in actual time? That's doable, but during certain circumstance this<br>
>> may mean that you go from 1AM to 1AM,<span class="aBn" tabindex="0"><span class="aQJ"> or from 1</span></span>AM to 3AM.<br>
>><br></span></blockquote><div>(The *second* option) </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
>> Or do you expect that adding one hour will increase the hour count<br>
>> with one, ie that the "wall time" increases with one hour? ...<br>
> Can you tell us which of the two operations datetime currently<br>
> implements?<br>
<br>
</span>It's intended that the first one is implemented, meaning that<br>
datetime.now() + timedelta(hours=24) can result in a datetime<br>
somewhere between 23 and 25 hours into the future.</blockquote></div><div class="gmail_extra"><br></div><div class="gmail_extra">I think this describes what was originally your *second*, not *first* option. It</div><div class="gmail_extra">will also help if you focus on one use case at a time. Your original example</div><div class="gmail_extra">dealt with adding 1 hour, but now you switch to adding 24.</div><div class="gmail_extra"><br></div>In my previous email, I explained what is currently doable using the datetime</div><div class="gmail_extra">module:<br><br></div><div class="gmail_extra"><div class="gmail_extra" style="font-size:12.8000001907349px">>>> t = datetime(2014,11,2,5,tzinfo=timezone.utc).astimezone()</div><div class="gmail_extra" style="font-size:12.8000001907349px">>>> t.strftime("%D %T%z %Z")</div><div class="gmail_extra" style="font-size:12.8000001907349px">'11/02/14 01:00:00-0400 EDT'</div><div class="gmail_extra" style="font-size:12.8000001907349px">>>> (t+timedelta(hours=1)).astimezone().strftime("%D %T%z %Z")</div><div class="gmail_extra" style="font-size:12.8000001907349px">'11/02/14 01:00:00-0500 EST'</div><div class="gmail_extra" style="font-size:12.8000001907349px"><br></div><div class="gmail_extra" style="font-size:12.8000001907349px">Is this your *first* or your *second* option? Note that this is not what</div><div class="gmail_extra" style="font-size:12.8000001907349px">is "intended". This is an actual Python 3.4.3 session.</div></div></div>