[Python-ideas] Additional datetime-like module

Mike Miller python-ideas at mgmiller.net
Tue Jul 28 22:10:37 CEST 2015

(Apologies, I've gotten a bit lost in the recent PEP-431 discussion on -dev.
To recap, it concerns changing datetime to use UTC internally.)

When doing datetime calculations, I read two major use cases, one I'll call 
"simple" (aka naive), and the other "robust", that comes into play when multiple 
users, zones, dst, leaps, and/or calendar requirements surface.

Instead of ignoring one case, or trying to shoehorn several into one module, I 
submit the cases could be broken into at least two modules, to make it very easy 
for the end-developer to understand which approach to use and when.

As a non-expert-in-the-area developer, I can say that it is difficult to look at 
the docs of datetime (and time) and know which approach to choose.  Then when 
you do choose, it isn't clear which functions and constants to use with each other.

Could we leave datetime supporting the simple/naive approach, deprecating robust 
features, and have another module built on top that expected/enforced robust 
UTC-based calculations?  Could we also focus the documentation of each module to 
that end?


More information about the Python-ideas mailing list