I'm going in circles trying to get an event created for a contact. I
create the contact and send it to google but receive a:
"Bad Request When element does not have start date set or it's
malformed."
Seems to be related to the date of the When in the addEvent().
Documentation says "Only the @startTime attribute is supported.
Furthermore, its value must be a pure date, without the time
component."
Code I'm using is like this:
==============================================
//per documentation: Exactly one of the label and rel attributes must
be provided.
Event event = new Event(null, Event.Rel.ANNIVERSARY) ;
//convert a date string to a date
SimpleDateFormat formatter = new SimpleDateFormat("EEE, d MMM yyyy");
Date date = (Date)f ormatter.parse(pojo.anniversary); // date is a
string formatted like "Mon, 25 Dec 2000 00:00:00 +0000"
When w = new When();
w.setStartTime( new DateTime( date ));
x.setWhen( w );
contact.addEvent(event);
==============================================
What am I missing?