[issue7662] time.utcoffset()
anatoly techtonik techto...@gmail.com added the comment: This one is a different issue. Even though it can not be solved without by #9527, it is not superseded by it. So, better add to dependencies. -- resolution: rejected - status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7662] time.utcoffset()
Changes by Brian Curtin cur...@acm.org: -- nosy: -brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7662] time.utcoffset()
Brett Cannon br...@python.org added the comment: You can discuss within the comments whether this issue should be re-opened or not, but do not take it upon yourself to change the status on your own once a core developer has already closed an issue as their decision supersedes that of a regular user. -- resolution: - rejected status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7662] time.utcoffset()
Changes by Brett Cannon br...@python.org: -- nosy: -brett.cannon status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7662] time.utcoffset()
anatoly techtonik techto...@gmail.com added the comment: I am tired. Do as you wish. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7662] time.utcoffset()
Changes by anatoly techtonik techto...@gmail.com: -- nosy: -techtonik ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7662] time.utcoffset()
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Just to clarify: Anatoly changed the resolution, not status (and I agree that was not appropriate.) The status was set to pending and that would change to open automatically if a new comment is posted. As for the substance of Anatoly's objection - I agree that this proposal is different from #9527. That is why I set resolution to rejected rathe than duplicate. This issue can probably be properly classified as a duplicate of #1647654, but I consider #9527 the most promising solution to the problem of finding the system timezone offset. -- stage: needs patch - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7662] time.utcoffset()
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: I am going to close this as superseded by #9527. All these issues, current, #9527, and #1647654 are really about Python's lack of access to the system timezone information and #9527 seem to be the most appropriate solution. My specific concern about proposed time.utcoffset() is that you normally need UTC offset together with current time, but localtime() call followed by utcoffset() may lead to a race condition. -- resolution: - rejected status: open - pending superseder: - Add aware local time support to datetime module ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7662] time.utcoffset()
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo versions: +Python 3.3 -Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7662] time.utcoffset()
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: I would prefer exposing tm_gmtoff in time.localtime() output. The advantage is that on platforms that support it is struct tm, it will return correct offset for times in the past, not only for the current time. See issue1647654. On platforms without tm_gmtoff we can fill it with -tm_isdst?timezone:altzone. The current situation on Linux is just backwards: we are trying to divine altzone by sampling tm_gmtoff and throw tm_gmtoff away. See http://blogs.gnome.org/jamesh/2006/12/31/python-timetimezone-timealtzone-edge-case/. -- assignee: - belopolsky nosy: +belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7662] time.utcoffset()
anatoly techtonik techto...@gmail.com added the comment: Updated Python code according to discussion from aforementioned issue #7582. Unfortunately, I can't find Python source for `time` module to make a proper patch out of it. def time.utcoffset(): Return current UTC offset in seconds isdst = time.localtime().tm_isdst if (time.daylight and isdst): return -time.altzone else: return -time.timezone -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7662] time.utcoffset()
Antoine Pitrou pit...@free.fr added the comment: The `time` module is written in C, in Modules/timemodule.c. If this is too bothersome to write in C, the function could perhaps be added to the datetime module instead. In any case, we need a proper patch, including unit tests if possible. (and I agree that anything making the time stuff easier to use is welcome) -- nosy: +brett.cannon, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7662] time.utcoffset()
Changes by Brian Curtin cur...@acm.org: -- priority: - normal stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7662] time.utcoffset()
anatoly techtonik techto...@gmail.com added the comment: Answered in msg97503 In the meanwhile it looks like another proposal about RFC format in issue #7584 doesn't account for proper timezone too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7662] time.utcoffset(dst=true)
New submission from anatoly techtonik techto...@gmail.com: The proposal to add the function that will allow to get current UTC offset. Do we need a PEP for this one? def time.utcoffset(): Return current UTC offset in seconds return -(time.altzone if time.daylight else time.timezone) -- components: Library (Lib) messages: 97463 nosy: techtonik severity: normal status: open title: time.utcoffset(dst=true) versions: Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7662] time.utcoffset()
Changes by anatoly techtonik techto...@gmail.com: -- title: time.utcoffset(dst=true) - time.utcoffset() ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7662] time.utcoffset()
Brian Curtin cur...@acm.org added the comment: I think this would be nice, but see msg97471 from your diff.py ISO timestamp issue. time.daylight should probably be time.localtime().tm_isdst. -- nosy: +brian.curtin type: - feature request versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7662 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com