[Freeipa-devel] [PATCH] jderose 028 Lossless datetime round-trip
Rob Crittenden
rcritten at redhat.com
Thu Dec 3 16:56:13 UTC 2009
Jason Gerard DeRose wrote:
> As per John's request, this patch allows lossless round-tripping of
> Python datetime.datetime objects.
>
> Unfortunately, the xmlrpclib dumps() and loads() functions use funny
> wrapper objects like xmlrpclib.DateTime rather than directly serializing
> to/from standard Python types like datetime.datetime. This makes
> lossless round-tripping pretty cumbersome to implement.
>
> Doing a loads(foo, use_datetime=True) would work, but the `use_datetime`
> kwarg is only available in Python2.5 and newer, so I instead extended my
> xml_wrap() and xml_unwrap() functions.
>
What should this do it if the incoming DateTime value is not parsed
correctly by datetime.datetime()?
rob
More information about the Freeipa-devel
mailing list