<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 27, 2015 at 10:38 AM, Akira Li <span dir="ltr"><<a href="mailto:4kir4.1i@gmail.com" target="_blank">4kir4.1i@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div id=":167" class="" style="overflow:hidden">An *observation*: the local timezone -- the only timezone with a variable<br>
utc offset in _stdlib -- behaves like pytz_:<br>
<br>
# start with the same utc time<br>
utc_time = datetime(2015, 10, 25, 1, tzinfo=timezone.utc)<br>
stdlib_time = utc_time.astimezone() # stdlib local time<br>
pytz_time = utc_time.astimezone(tzlocal.get_localzone())</div></blockquote></div><br>I have no idea where you get tzlocal from, but I can assure you that there is no such thing in the standard library.</div><div class="gmail_extra"><br></div><div class="gmail_extra">What we do have is an option to call .astimezone() without a tzinfo argument and get an aware datetime instance with tzinfo set to a fixed offset timezone. In this respect, .astimezone() is indeed similar to pytz's localize()/normalize(), but it is much simpler.</div></div>