logo       

'startDate' attribute in appointment is not a date-value: msg#00019

Subject: 'startDate' attribute in appointment is not a date-value
I'm writing a script (in Python) to import appointments from the PHPGroupware 
calendar into Ogo, and I'm getting this error ; as near as I can see : 
startDate IS a date-value (ie an  xmlrpclib.DateTime object).  Perhaps I'm 
getting the data format wrong or something??

FYI heres the code snippet that causes it:

        for appt in calender:
                        print appt['datetime']
                        ogo_appt = {
                                'owner' : 
ogoAccount(ogoAccount(gw_logins[appt["owner"]])),
                                'startDate' : xmlrpclib.DateTime( 
appt['datetime']),
                                'endDate' : 
xmlrpclib.DateTime(appt['edatetime']),
                                'title' : appt['title'],
                                'location' : appt['location']
                        }

                        #Make appointments 1 hour by default
                        if  appt['edatetime'] == appt['datetime'] : 
                                ogo_appt['endDate'] =  
xmlrpclib.DateTime(appt['datetime'] + 60*60)

                        print "-----------------------------------"
                        pprint.pprint(ogo_appt)
                        if not debug:
                                print "+++Inserting"
                                ogo_server.appointment.insert(ogo_appt)

And more interestingly, heres the actual record this code is trying to insert:
{'endDate': <DateTime 20020328T02:00:00 at 82effbc>,
 'location': 'E-Center',
 'owner': {'login': 'root', 'id': 'skyrix://pollux/ogo_dev/10000'},
 'startDate': <DateTime 20020328T01:00:00 at 82f0364>,
 'title': 'IMR Meeting'}

In the logs I see:
Sep 08 07:46:22 xmlrpcd [18415]: <>DirectAction>>D decoded XMLRPC call: 
<0x095FE87C[XmlRpcMethodCall]: method=appointment.insert #paras=1>
Sep 08 07:46:22 xmlrpcd [18415]: <>DirectAction>>D WARNING: invalid start-date 
parameter: {
    value = "20020328T01:00:00";
}(NSConcreteSingleObjectDictionary)
Sep 08 07:46:22 xmlrpcd [18415]: >DirectAction> Fault[2] occured: 'startDate' 
attribute in appointment is not a date-value!
192.168.1.7 - - [08/Sep/2003:07:46:22 GMT] "POST /xmlrpc/ HTTP/1.0" 200 300 
0.008 - - 0

Does anyone have any ideas whats going on here? Is it a bug, or am I just 
overlooking something obvious?

-- 
Jonathon Sim <sim@xxxxxxxxx> Developer/Network Administrator@Zeald Ltd
JabberID: sim@xxxxxxxxxx
--

-- 
OpenGroupware.org XML-RPC
xmlrpc@xxxxxxxxxxxxxxxxx
http://mail.opengroupware.org/mailman/listinfo/xmlrpc



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    politics.lenini...    audio.emagic.ex...    tex.texinfo.gen...    handhelds.linux...    ietf.sipping/20...    lang.erlang.gen...    cygwin.talk/200...    yellowdog.gener...    mozilla.devel.l...    xfree86.newbie/...    openbsd.ports/2...    db.oracle.devel...    kde.kalyxo.deve...    user-groups.lin...    bbc.cvs/2003-04...    gnu.libtool.bug...    redhat.k12osn/2...    emulators.wine....    freebsd.devel.d...    search.xapian.g...    java.izpack.use...    network.mrtg.us...    windows.total-c...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe