[Freeipa-devel] GeneralizedTime v.s datetime.datetime in XMLRPC
Rob Crittenden
rcritten at redhat.com
Wed Nov 4 20:52:40 UTC 2009
John Dennis wrote:
> In parameters.py we define a GeneralizedTime object to be used as an
> XMLRPC parameter. Why?
GeneralizedTime isn't defined as an XML-RPC paramter, just an IPA one
and XML-RPC just comes along for the ride. We only needed support for
RFC 4517.
> * XMLRPC defines the dateTime.iso8601 parameter value type for passing
> date/time information
>
> * Python has good support for date/time processing in it's datetime module
>
> * Python's xmlrpclib supports both xmlrpclib.DateTime and
> datetime.datetime objects.
>
> * Python's xmlrpclib can be configured to use datetime.datetime objects
> intead of xmlrpclib.DateTime objects if you pass use_datetime=True when
> invoking xmlrpclib.loads(), however we don't do that. Why?
Never needed dates.
> * ISO 8601 is an internet standard for passing date time information
> between cooperating network entities. However GeneralizedTime is only
> valid in a subset of binary protocols (primarily LDAP and PKI)
And it is LDAP we end up speaking.
> Given that ISO 8601 is the preferred standard, that's it is directly
> supported by XMLRPC, is compatible with datetime.datetime and the fact
> datetime.datetime has excellent support in Python shouldn't we be using
> datetime.datetime for all our date/time information and only convert to
> and from GeneralizedTime for the subset of interfaces which require
> GeneralizedTime?
>
This could always be revisited but at the time we didn't need full-blown
support and in fact don't want timezone information.
rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3245 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20091104/c5df5338/attachment.bin>
More information about the Freeipa-devel
mailing list