|
Last change
on this file since 3665 was
1,
checked in by myroslav, 20 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 | ####################################################################### |
|---|
| 6 | import xmlrpclib |
|---|
| 7 | import DateTime as ZopeDateTime |
|---|
| 8 | |
|---|
| 9 | def encodeZopeDateTime(self, out): |
|---|
| 10 | dtObj = xmlrpclib.DateTime('%s%02d%02dT%02d:%02d:%02d' % self.parts()[:-1]) |
|---|
| 11 | dtObj.encode(out) |
|---|
| 12 | |
|---|
| 13 | ZopeDateTime.DateTime.encode = encodeZopeDateTime |
|---|
| 14 | |
|---|
| 15 | xmlrpclib.WRAPPERS += (ZopeDateTime.DateTime,) |
|---|
Note: See
TracBrowser
for help on using the repository browser.