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.
Description: S/MIME Cryptographic Signature
_______________________________________________ Freeipa-devel mailing list Freeipaemail@example.com https://www.redhat.com/mailman/listinfo/freeipa-devel