Le Jun 5, 2012 à 6:16 PM, Nick Coghlan a écrit :

> Personally, I'd like to see the datetime module make an explicit
> assumption that "all naive datetime objects are considered to be UTC",
> with the interactions between naive and aware objects updated
> accordingly

I would absolutely love it if this were true.  In fact, I would go a step 
further and say that the whole concept of a "naive" datetime is simply a bug.  
We don't have a "naive" unicode, for example, where it's text in some encoding 
but you decline to decide which one when you decode it, leaving that to the 
caller.

When we addresed this problem for ourselves at Divmod some time ago, naive=UTC 
is exactly what we did:

<http://bazaar.launchpad.net/~divmod-dev/divmod.org/trunk/files/head:/Epsilon/epsilon/extime.py>
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to