[Python-Dev] Add UTC to 2.7 (PyCon sprint idea)

Nick Coghlan ncoghlan at gmail.com
Tue Feb 16 13:36:58 CET 2010


Victor Stinner wrote:
> Hi,
> 
> Le Tuesday 16 February 2010 11:38:05 anatoly techtonik, vous avez écrit :
>> So far, Python timezone handling is far from "pythonic". There is no
>> function to get current UTC offset, (...)
> 
> There is the time.timezone attribute: UTC offset in seconds.
> 
>> One of the reasons I see is that date/time functions are
>> implemented in C, they expose C API, and there are not many people who
>> can help and patch them.
> 
> Is it no possible to extend Python datetime module in Python?

Splitting datetime into a datetime.py with an underlying _datetime.c is
an idea definitely worth exploring - that module structure makes it much
easier to accelerate things that need it, while allowing less critical
or more complex aspects to be written in the higher level language.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------


More information about the Python-Dev mailing list