[kronolith] DateTime types in xml_rpc

Matthew Sackman matthew at sackman.co.uk
Sun Apr 20 18:14:57 PDT 2003


On Sun, Apr 20, 2003 at 11:32:36AM -0400, Chuck Hagenbuch wrote:
> Quoting Matthew Sackman <matthew at sackman.co.uk>:
> > So that allows one to supply the timestamps and indeed it does work.
> > I've no idea what else that breaks though... ;)
> 
> Pretty much anything else using the API. I've modified
> Kronolith::listEvents() so it'll take a timestamp or an object (you can,
> btw, just pass the API a struct with year, month, and mday elements, and it
> will work as-is). Try my commit.

Have done, you seem to have made a couple of typos on lines 227 and 232
with the bracketing around the elsif conditions. Apart from that it
works fine. Many thanks.

Incidentatlly, I have tried using a struct:
---- request ----
<?xml version="1.0"?>
<methodCall>
<methodName>calendar.list</methodName>
<params>
<param><value><struct>
<member><name>month</name><value><i4>4</i4></value></member>
<member><name>mday</name><value><i4>20</i4></value></member>
<member><name>year</name><value><i4>2003</i4></value></member>
</struct></value>
</param>
<param><value><struct>
<member><name>month</name><value><i4>4</i4></value></member>
<member><name>mday</name><value><i4>23</i4></value></member>
<member><name>year</name><value><i4>2003</i4></value></member>
</struct></value>
</param>
<param><value><array><data>
<value><string>test</string></value></data></array></value>
</param>
<param><value><boolean>1</boolean></value>
</param>
</params>
</methodCall>

But I get nothing back. I've tried setting month as a number or as the
name of the month and still I get nothing back. Any ideas?

Also, I'm not quite sure whether this is by design or not, and I take
it you've seen the bug report (#1225) but Kronolith::listEvents does not
check the authentication for permission to read from the calendar. Thus
anyone can read from any calendar.

Matthew
-- 
Matthew Sackman


More information about the kronolith mailing list