source: products/SimpleBlog/branches/plone-2.1-Blogging-APIs/xmlrpcMonkeyPatch.py @ 3665

Last change on this file since 3665 was 1, checked in by myroslav, 18 years ago

Building directory structure

  • Property svn:eol-style set to native
File size: 461 bytes
Line 
1#
2# Monkey Patch file to allow zope to marshal Zope DateTime objects into
3# xml-rpc DateTime objects
4#
5#######################################################################
6import xmlrpclib
7import DateTime as ZopeDateTime
8
9def encodeZopeDateTime(self, out):
10    dtObj = xmlrpclib.DateTime('%s%02d%02dT%02d:%02d:%02d' % self.parts()[:-1])
11    dtObj.encode(out)
12
13ZopeDateTime.DateTime.encode = encodeZopeDateTime
14
15xmlrpclib.WRAPPERS += (ZopeDateTime.DateTime,)
Note: See TracBrowser for help on using the repository browser.