get rid of mx.datetime dependency

Registered by Raphaël Valyi -

Hi, after some investigation, it seems that:
mx.DateTime has been created after a package called zxDateTime that has been integrated as the standard "datetime" module in Python 2.3 around 2003.
mx.DateTime might have a few extra, but overall I think we could get rid of that dependency.
t o
Why mx.DateTime sucks?
- it's one more dependency, something to package, to grab from some strange and bad looking site (image prejudice)
- it sucks to install for the poor developers stuck on Windows (I'm not one)
- it's backed by C only (no more compatible pure Python implementation), meaning that it suck especially to run OpenERP server on Jython or PyPy.

It seems that the mx.Datetime can be backed by the standard datetime package. Except may be some parsing features (TODO ensure). In Tryton for instance, they got rid of mx.DateTime entirely already.

mx.RelativeDateTime might be backed by datetime.timedelta.
or may be: from dateutil.relativedelta import *

I discussed that with Jython/Python specialists, like Jim Baker and all agree on that.

Also, if something is missing, it looks like the most standard way of getting those extra miles should be using the following library instead:
see for example

Hope we could do that house cleaning.

Blueprint information

Raphaël Valyi -
Needs approval
Cristian Salamea
Series goal:
Beta Available
Milestone target:
Started by
Raphaël Valyi -


You say "it seems it doesn't deal with old date (before 1970?)" but it's not true. It can even handle B.C. dates which the datetime module cannot.

I think Open ERP should have it's own datetime manipulation library. Perhaps ''. It will use mx.Datetime if available and datetime + custom made methods (parsing methods for example) if mx.Datetime is not available.

See Cristian Salamea (ovnicraft) branch making good progress on this here:


Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.