This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Patch: xmlrpclib client ignores datetime tzinfo when creating iso8601 dates
Type: behavior Stage:
Components: XML Versions: Python 3.2, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Thomas Fenzl, lclark, schmir
Priority: normal Keywords: patch

Created on 2008-04-12 06:11 by lclark, last changed 2022-04-11 14:56 by admin.

Files
File name Uploaded Description Edit
xmlrpclib-timezone.patch lclark, 2008-04-12 06:11 Patch for xmlrpclib.py, adds iso8601 with timezone info
Messages (4)
msg65394 - (view) Author: Leonard Clark (lclark) Date: 2008-04-12 06:11
xmlrpclib ignores datetime parameter timezone information.  Two spots
were identified to apply a new formatting function, _iso8601format, to
ensure that the timezone is passed to the server.

I would like this fix to be included in future releases. (Thank you!)
msg65688 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2008-04-22 22:26
Leonard,

Can you reformulate your patch in terms of the current xmlrpclib module
code?  It no longer applies cleanly.  Also, to be considered it will
definitely need new test cases and may well need documentation changes.

Also, note that the XML-RPC "spec" is notoriously vague.  If you're
going to be messing about with the serialized form of datetime objects I
think you'll need to demonstrate that it doesn't break interoperability
with implementations for other languages.
msg65697 - (view) Author: Leonard Clark (lclark) Date: 2008-04-23 07:48
While the XML-RPC spec is vague with regards to respecting time zone
information, the iso8601 document is not vague as to how to properly
serialize it.

Some XML-RPC libraries (like ours) completely ignore time zone
information.  I will make every effort to test this against as many
libraries as I can.

While I'm at it, I'll see about adding support for time zone information
in server results.
msg184795 - (view) Author: Thomas Fenzl (Thomas Fenzl) * Date: 2013-03-20 20:56
Is this still relevant?
The new xmlrcp.client still dumps both naive and aware datetimes as ISO 8601 strings without timezone information. xmlrpc.client.DateTime does not handle ISO 8601 with timezone information. 

So if it is, it could be updated to using strings without timezone for naive datetimes and with timezone for aware. Not sure if that could break clients parsing the xml themselves.
History
Date User Action Args
2022-04-11 14:56:33adminsetgithub: 46875
2013-03-20 20:56:25Thomas Fenzlsetnosy: + Thomas Fenzl
messages: + msg184795
2010-08-04 21:43:20terry.reedysetversions: + Python 2.7, Python 3.2, - Python 2.6, Python 2.5, Python 3.0
2010-05-20 20:42:14skip.montanarosetassignee: skip.montanaro ->
2010-05-20 20:33:44skip.montanarosetnosy: - skip.montanaro
2008-04-23 07:48:10lclarksetmessages: + msg65697
2008-04-22 22:47:40skip.montanarosetpriority: normal
2008-04-22 22:26:45skip.montanarosetassignee: skip.montanaro
messages: + msg65688
nosy: + skip.montanaro
2008-04-20 20:04:37schmirsetnosy: + schmir
2008-04-12 06:11:48lclarkcreate