office365 - Unable to Update DateTime value for Start and End of IEvent Office 365 -


i using office 365 v2 dll , tryign update datetime value start , end properties of ievent fails update event without error.

my code :-

        try         {             var taskupdatemeeting = task<bool>.run(async () =>             {                 bool updatestatus = false;                 ievent meetingtoupdate = await service.me.events.getbyid(meetingeventid).executeasync();                 if (meetingtoupdate != null)                 {                         meetingtoupdate = getupdatedevent(meetingtoupdate, meeting, location, phone);    // function update ievent obj values needed update                     meetingtoupdate.start.datetime = "2016-08-06t19:00:00.0000000";        // sample value datetime property                     meetingtoupdate.end.datetime = "2016-08-06t19:30:00.0000000";                     meetingtoupdate.start.timezone = "asia/kolkata";        // sample value timezone property                     meetingtoupdate.end.timezone = "asia/kolkata";                      if (invitees != null && invitees.count > 0)                         invitees.foreach((invitee) => meetingtoupdate.attendees.add(new attendee()                         {                             emailaddress = new emailaddress()                             {                                 name = invitee.name,                                 address = invitee.email                             },                             status = new responsestatus()                             {                                 response = responsetype.accepted,                                 time = datetime.now                             }                         }));                     await meetingtoupdate.updateasync(true);                     await meetingtoupdate.savechangesasync();                     //await meetingtoupdate.savechangesasync();                     //await service.context.savechangesasync();                       updatestatus = true;                 }                 return updatestatus;             });             task.waitall(taskupdatemeeting);             updated = taskupdatemeeting.result;         }         catch (exception ex)         {             insertexceptionlog(userid, username, "updatecalendarevent excp -> " + ex.gettype(), ex.message, ex.innerexception != null ? ex.innerexception.tostring() : null, ex.tostring() + ex.stacktrace);             updated = false;         } 

the problem start , end time. other properties updating correctly when updateasync method called. meeting in same timezone in updated timezone property. please suggest if doing wrong here. let me know if other information required.

instead of set date , time zone directly, can set start , end property. sample below works me:

datetimetimezone newstart = new datetimetimezone(); newstart.datetime= "2016-08-06t19:00:00.0000000"; newstart.timezone = "asia/kolkata";  datetimetimezone newend = new datetimetimezone(); newend.datetime = "2016-08-06t19:30:00.0000000"; newend.timezone = "asia/kolkata"; 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -