[EMAIL PROTECTED]
> Modified Files:
> xmlrpclib.py
> Log Message:
> accept datetime.datetime instances when marshalling;
> dateTime.iso8601 elements still unmarshal into xmlrpclib.DateTime objects
>
> Index: xmlrpclib.py
...
> + if datetime and isinstance(value, datetime.datetime):
> + self.value = value.strftime("%Y%m%dT%H:%M:%S")
> + return
... [and similarly later] ...
Fred, is there a reason to avoid datetime.datetime's .isoformat()
method here? Like so:
>>> import datetime
>>> print datetime.datetime(2005, 2, 10, 14, 0, 8).isoformat()
2005-02-10T14:00:08
A possible downside is that you'll also get fractional seconds if the
instance records a non-zero .microseconds value.
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com