[issue22241] strftime/strptime round trip fails even for UTC datetime object

2015-09-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset ea1bfb64e898 by Victor Stinner in branch 'default': Issue #22241: Fix a compiler waring https://hg.python.org/cpython/rev/ea1bfb64e898 -- ___ Python tracker __

[issue22241] strftime/strptime round trip fails even for UTC datetime object

2015-09-06 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue22241] strftime/strptime round trip fails even for UTC datetime object

2015-09-06 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> fixed stage: commit review -> resolved ___ Python tracker ___ ___ Python-bugs-lis

[issue22241] strftime/strptime round trip fails even for UTC datetime object

2015-09-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset f904b7eb3981 by Alexander Belopolsky in branch 'default': Closes Issue#22241: timezone.utc name is now plain 'UTC', not 'UTC-00:00'. https://hg.python.org/cpython/rev/f904b7eb3981 -- nosy: +python-dev ___

[issue22241] strftime/strptime round trip fails even for UTC datetime object

2015-09-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Addressed review comments. -- Added file: http://bugs.python.org/file40382/issue22241-2.diff ___ Python tracker ___ __

[issue22241] strftime/strptime round trip fails even for UTC datetime object

2015-09-03 Thread Berker Peksag
Berker Peksag added the comment: I left a couple comments on Rietveld. -- nosy: +berker.peksag ___ Python tracker ___ ___ Python-bugs-

[issue22241] strftime/strptime round trip fails even for UTC datetime object

2015-09-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- stage: patch review -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue22241] strftime/strptime round trip fails even for UTC datetime object

2015-08-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file40283/issue22241.diff ___ Python tracker ___ ___ Python-bugs-list m

[issue22241] strftime/strptime round trip fails even for UTC datetime object

2015-08-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file40284/issue22241.diff ___ Python tracker ___ ___ Python-bugs-list mai

[issue22241] strftime/strptime round trip fails even for UTC datetime object

2015-08-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file40283/issue22241.diff ___ Python tracker ___ _

[issue22241] strftime/strptime round trip fails even for UTC datetime object

2015-08-26 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky stage: -> needs patch type: enhancement -> behavior versions: +Python 3.6 -Python 3.5 ___ Python tracker ___ __

[issue22241] strftime/strptime round trip fails even for UTC datetime object

2015-08-26 Thread Guido van Rossum
Guido van Rossum added the comment: OK, I guess we can change stdlib datetime.timezone.utc's str() to 'UTC'. Make sure to update both the C and the Python version, and the tests, and the docs. It's going to have to go into 3.6. -- nosy: +gvanrossum

[issue22241] strftime/strptime round trip fails even for UTC datetime object

2014-08-21 Thread Akira Li
Akira Li added the comment: > I see that you participated in the original discussion (msg107608). > We settled on str(timezone.utc) == 'UTC+00:00' and this was clearly a > deliberate choice. I don't think we can revisit this now, but we can > probably make strptime smart enough to parse UTC±hh:m

[issue22241] strftime/strptime round trip fails even for UTC datetime object

2014-08-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Akira, I see that you participated in the original discussion (msg107608). We settled on str(timezone.utc) == 'UTC+00:00' and this was clearly a deliberate choice. I don't think we can revisit this now, but we can probably make strptime smart enough t

[issue22241] strftime/strptime round trip fails even for UTC datetime object

2014-08-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: See also . It looks like providing 'UTC' as the name of utc singleton was part of my original proposal. I have no recollection on why it was not implemented that way. -- nosy: +brett.cannon, mark.dick

[issue22241] strftime/strptime round trip fails even for UTC datetime object

2014-08-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I see. I thought you were complaining about "%z" format not supporting "00:00" as in >>> from datetime import * >>> datetime.strptime("00:00","%z") Traceback (most recent call last): .. ValueError: time data '00:00' does not match format '%z' but your

[issue22241] strftime/strptime round trip fails even for UTC datetime object

2014-08-21 Thread Akira Li
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.u

[issue22241] strftime/strptime round trip fails even for UTC datetime object

2014-08-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This is a duplicate of #15873. -- components: +Extension Modules resolution: -> duplicate status: open -> closed superseder: -> datetime: add ability to parse RFC 3339 dates and times type: behavior -> enhancement versions: -Python 3.4

[issue22241] strftime/strptime round trip fails even for UTC datetime object

2014-08-21 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue22241] strftime/strptime round trip fails even for UTC datetime object

2014-08-21 Thread Akira Li
New submission from Akira Li: >>> from datetime import datetime, timezone >>> dt = datetime.now(timezone.utc) >>> fmt = '%Y-%m-%d %H:%M:%S.%f %Z%z' >>> datetime.strptime(dt.strftime(fmt), fmt) Traceback (most recent call last): File "", line 1, in File "/cpython/Lib/_strptime.py"