[Python-Dev] calendar.timegm

Donovan Baarda abo at minkirri.apana.org.au
Thu Feb 23 10:21:13 CET 2006


On Tue, 2006-02-21 at 22:47 -0600, skip at pobox.com wrote:
>     Sergey> Historical question ;)
> 
>     Sergey> Anyone can explain why function timegm is placed into module
>     Sergey> calendar, not to module time, where it would be near with
>     Sergey> similar function mktime?
> 
> Historical accident. ;-)

It seems time contains a simple wrapper around the equivalent C
functions. There is no C equivalent to timegm() (how do they do it?).

The timegm() function is implemented in python using the datetime
module. The name sux BTW.

It would be nice if there was a time.mkgmtime(), but it would need to be
implemented in C.


-- 
Donovan Baarda <abo at minkirri.apana.org.au>
http://minkirri.apana.org.au/~abo/



More information about the Python-Dev mailing list