[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2018-06-19 Thread oric
oric added the comment: Please don't name it timegm which is such a stupid name (why not mgemit!). I knows it comes from history but history had timelocal which has been replaced by mktime (and python has mktime and not timelocal) so please, call it mkgmtime time.mkgmtime() I think it would

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2016-10-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I would like to revisit this for 3.7. -- keywords: -needs review, patch priority: low -> normal resolution: rejected -> stage: commit review -> needs patch status: closed -> open versions: +Python 3.7 -Python 3.2

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2012-11-05 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-12-23 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-11-30 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am going to close this as "rejected" unless someone objects. The benefit is too small to make users suffer through the deprecation process. -- resolution: -> rejected status: open -> pending ___ Python tra

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-06-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I reverted r81988 in r81989. Some code may rely on timegm() accepting float in tm_sec. See http2time in Lib/http/cookiejar.py. It is very easy to modify implementation to accept float seconds, but old implementation accidentally work for float hours an

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-06-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed issue6280-calendar.diff in r81988. I believe tests should be merged in 2.7. Any objections? As for the original RFE, I think it should be rejected. I believe users should be encouraged to use datetime objects instead of timetuples and conve

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-06-14 Thread Mark Dickinson
Mark Dickinson added the comment: The issue6280-calendar.diff patch looks good to me. -- assignee: mark.dickinson -> belopolsky ___ Python tracker ___ ___

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-06-11 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Mark, reassigning this to you for commit review. -- assignee: belopolsky -> mark.dickinson ___ Python tracker ___

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-06-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: With recent enhancements to datetime module, timegm has become a 1-liner: EPOCH = 1970 _EPOCH_DATETIME = datetime.datetime(EPOCH, 1, 1) _SECOND = datetime.timedelta(seconds=1) def timegm(tuple): """Unrelated but handy function to calculate Unix times

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-04-26 Thread Francesco Del Degan
Francesco Del Degan added the comment: I thinks that isn't a so easy decision to take. And there are some other issues, imho: 1. timegm function is not specified by any standard (POSIX). The portable way (setting TZ, calling mktime, restore TZ) is a pure hack (could not work in future multit

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-04-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Some more comments: - Documentation needs a "versionadded" entry. - A fate of calendar.timegm() needs to be decided. If the decision is to deprecate it, deprecation warning need to be added to calendar module and docs updated accordingly. Given that

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-04-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It is too late to get new features in 2.x. Francesco, Please double-check timemodule-gmtime-r312.diff, it does not seem to reflect your reported changes. ('-' vs '--' typo is still there) There is no need to submit multiple patches. A patch for py3k b

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-04-26 Thread Francesco Del Degan
Francesco Del Degan added the comment: Fixed typos, new patches added -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-04-26 Thread Francesco Del Degan
Changes by Francesco Del Degan : Removed file: http://bugs.python.org/file16354/timemodule-gmtime-2-r264.diff ___ Python tracker ___ ___ Python

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-04-26 Thread Francesco Del Degan
Changes by Francesco Del Degan : Removed file: http://bugs.python.org/file16353/timemodule-gmtime-2-r311.diff ___ Python tracker ___ ___ Python

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-04-26 Thread Francesco Del Degan
Changes by Francesco Del Degan : Removed file: http://bugs.python.org/file16352/timemodule-gmtime-2-r27a3.diff ___ Python tracker ___ ___ Pytho

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-04-26 Thread Francesco Del Degan
Changes by Francesco Del Degan : Removed file: http://bugs.python.org/file16351/timemodule-gmtime-2-trunk.diff ___ Python tracker ___ ___ Pytho

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-04-26 Thread Francesco Del Degan
Changes by Francesco Del Degan : Added file: http://bugs.python.org/file17088/timemodule-gmtime-3-trunk.diff ___ Python tracker ___ ___ Python-

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-04-26 Thread Francesco Del Degan
Changes by Francesco Del Degan : Added file: http://bugs.python.org/file17087/timemodule-gmtime-r312.diff ___ Python tracker ___ ___ Python-bug

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-04-26 Thread Francesco Del Degan
Changes by Francesco Del Degan : Added file: http://bugs.python.org/file17086/timemodule-gmtime-r27b1.diff ___ Python tracker ___ ___ Python-bu

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-04-26 Thread Francesco Del Degan
Changes by Francesco Del Degan : Added file: http://bugs.python.org/file17085/timemodule-gmtime-r265.diff ___ Python tracker ___ ___ Python-bug

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-02-24 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Looks good. A documentation typo: gmtime() -- convert seconds since Epoch to UTC tuple\n\ +timegm() - Convert a UTC tuple to seconds since the Epoch.\n\ Note the use of -- in the existing items. I understand that the choice of float for return value

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-02-24 Thread Francesco Del Degan
Francesco Del Degan added the comment: Those are the new updated patches with ifdef wrapped timegm function, docs, and a conversion test. -- Added file: http://bugs.python.org/file16351/timemodule-gmtime-2-trunk.diff ___ Python tracker

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-02-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The patch (I reviewed timemodule-gmtime-trunk.diff) looks mostly correct. One problem that I see is that it will likely produce compiler warnings on the systems without timegm and mktime. The warnings will be due to unused static function time_timegm

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-02-23 Thread Francesco Del Degan
Francesco Del Degan added the comment: I attached a patch that implements timegm according to two constraints: 1. If HAVE_TIMEGM is defined, use it or 2. If HAVE_MKTIME and HAVE_WORKING_TZSET use a portable way, using mktime (taken from timegm(3) man) Attached patches are for: r264, r273a1

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-02-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Francesco, You have my +1 for implementing both 1 and 2 below. """ 1. Use timegm(3) function where HAVE_TIMEGM is defined (i have a working patch for it) 2. Implement a more portable timegm function with tzset and mktime where HAVE_MKTIME and HAVE_WOR

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2009-10-09 Thread Simon Cross
Simon Cross added the comment: The attached patch adds a simple implementation of time.timegm that calls calendar.timegm. It includes a short test to show that time.timegm(time.gmtime(ts)) == ts for various timestamps. I implemented a pure C version by pulling in the various functions needed f

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2009-10-08 Thread Anh Hai Trinh
Changes by Anh Hai Trinh : -- nosy: +aht versions: +Python 2.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2009-08-06 Thread Simon Cross
Changes by Simon Cross : -- nosy: +hodgestar ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2009-08-06 Thread Francesco Del Degan
Francesco Del Degan added the comment: Hi, i started to produce a patch for timemodule.c. Working into it, i found that we have almost 3 way to do that: 1. Use timegm(3) function where HAVE_TIMEGM is defined (i have a working patch for it) 2. Implement a more portable timegm function with tz

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2009-06-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Do you want to write a patch? (Note: the time module is written in C) -- nosy: +amaury.forgeotdarc stage: -> needs patch ___ Python tracker _

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2009-06-13 Thread Zooko O'Whielacronx
Zooko O'Whielacronx added the comment: Here is the ticket that tracked this issue within the Tahoe-LAFS project: http://allmydata.org/trac/tahoe/ticket/733 -- ___ Python tracker

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2009-06-13 Thread Zooko O'Whielacronx
New submission from Zooko O'Whielacronx : I've been struggling to write a function that takes UTC timestamps in ISO-8601 strings and returns UTC timestamps in unix-seconds-since-epoch. The first implementation used time.mktime() minus time.timezone (http://allmydata.org/trac/tahoe/browser/src/al