Akira Li added the comment: I don't see, how it is a duplicate. Everything works if pytz.utc (.tzname() == 'UTC') is used instead of timezone.utc (.tzname() == 'UTC+00:00'). Everything works if UTC class from the example [1] in the tzinfo docs is used. It only breaks due to the weird timezone.utc.tzname() return value.
[1] https://docs.python.org/3.4/library/datetime.html#datetime.tzinfo.fromutc Why does datetime.now(timezone.utc).strftime('%Z') (via timezone.utc.tzname(dt)) produce 'UTC+00:00'? How is it motivated? Is it documented somewhere? Can datetime.now(timezone.utc).strftime('%Z') be changed to return 'UTC'? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22241> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com