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

Simon Cross report at bugs.python.org
Fri Oct 9 16:40:25 CEST 2009


Simon Cross <hodgestar at 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 various functions
needed from datetime, but it was a bit messy and a lot more invasive.

Documentation updates are still needed -- I will do those if there is
support for the patch.

----------
keywords: +patch
Added file: http://bugs.python.org/file15092/add-timegm-to-time.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6280>
_______________________________________


More information about the Python-bugs-list mailing list