[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:

[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

[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 j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6280 ___ ___ Python-bugs-list mailing list

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

2010-12-23 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6280 ___

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

2010-11-30 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net 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

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

2010-06-14 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: The issue6280-calendar.diff patch looks good to me. -- assignee: mark.dickinson - belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6280

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

2010-06-14 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net 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

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

2010-06-14 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net 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

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

2010-06-12 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Mark, reassigning this to you for commit review. -- assignee: belopolsky - mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6280

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

2010-06-05 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net 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

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

2010-04-26 Thread Francesco Del Degan
Changes by Francesco Del Degan f.delde...@ngi.it: Added file: http://bugs.python.org/file17085/timemodule-gmtime-r265.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6280 ___

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

2010-04-26 Thread Francesco Del Degan
Changes by Francesco Del Degan f.delde...@ngi.it: Added file: http://bugs.python.org/file17086/timemodule-gmtime-r27b1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6280 ___

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

2010-04-26 Thread Francesco Del Degan
Changes by Francesco Del Degan f.delde...@ngi.it: Added file: http://bugs.python.org/file17087/timemodule-gmtime-r312.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6280 ___

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

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

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

2010-04-26 Thread Francesco Del Degan
Changes by Francesco Del Degan f.delde...@ngi.it: Removed file: http://bugs.python.org/file16351/timemodule-gmtime-2-trunk.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6280 ___

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

2010-04-26 Thread Francesco Del Degan
Changes by Francesco Del Degan f.delde...@ngi.it: Removed file: http://bugs.python.org/file16352/timemodule-gmtime-2-r27a3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6280 ___

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

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

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

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

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

2010-04-26 Thread Francesco Del Degan
Francesco Del Degan f.delde...@ngi.it added the comment: Fixed typos, new patches added -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6280 ___

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

2010-04-26 Thread Alexander Belopolsky
Alexander Belopolsky alexander.belopol...@gmail.com 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

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

2010-04-26 Thread Alexander Belopolsky
Alexander Belopolsky alexander.belopol...@gmail.com 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

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

2010-04-26 Thread Francesco Del Degan
Francesco Del Degan f.delde...@ngi.it 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

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

2010-02-24 Thread Francesco Del Degan
Francesco Del Degan f.delde...@ngi.it 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

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

2010-02-24 Thread Alexander Belopolsky
Alexander Belopolsky alexander.belopol...@gmail.com 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

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

2010-02-23 Thread Francesco Del Degan
Francesco Del Degan f.delde...@ngi.it 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

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

2010-02-23 Thread Alexander Belopolsky
Alexander Belopolsky alexander.belopol...@gmail.com 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

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

2010-02-20 Thread Alexander Belopolsky
Alexander Belopolsky alexander.belopol...@gmail.com 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

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

2009-10-09 Thread Simon Cross
Simon Cross hodges...@gmail.com 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

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

2009-10-08 Thread Anh Hai Trinh
Changes by Anh Hai Trinh anh.hai.tr...@gmail.com: -- nosy: +aht versions: +Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6280 ___ ___

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

2009-08-06 Thread Francesco Del Degan
Francesco Del Degan f.delde...@ngi.it 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

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

2009-08-06 Thread Simon Cross
Changes by Simon Cross hodges...@gmail.com: -- nosy: +hodgestar ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6280 ___ ___ Python-bugs-list

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

2009-06-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com 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 rep...@bugs.python.org

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

2009-06-13 Thread Zooko O'Whielacronx
New submission from Zooko O'Whielacronx zo...@zooko.com: 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

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

2009-06-13 Thread Zooko O'Whielacronx
Zooko O'Whielacronx zo...@zooko.com 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 rep...@bugs.python.org http://bugs.python.org/issue6280