Message225623
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'? |
|
Date |
User |
Action |
Args |
2014-08-21 23:45:20 | akira | set | recipients:
+ akira, belopolsky |
2014-08-21 23:45:20 | akira | set | messageid: <1408664720.86.0.544786788738.issue22241@psf.upfronthosting.co.za> |
2014-08-21 23:45:20 | akira | link | issue22241 messages |
2014-08-21 23:45:20 | akira | create | |
|