Copilot for Microsoft 365 Tech Accelerator
Feb 28 2024 07:00 AM - Feb 29 2024 10:30 AM (PST)
Microsoft Tech Community
LIVE

Calendar API time bug

Copper Contributor

I'm using this fragment of code:

 

var events = await graphClient.Users["tomasz.borawski@itexcellence.pl"].CalendarView
.Request(queryOptions)
.Header("Prefer", "outlook.timezone=\"Central European Standard Time\"")
.Select("body,end,id,start,subject,SeriesMasterId")
.GetAsync();


var pageIterator = PageIterator<Event>
.CreatePageIterator(graphClient, events, (m) => {
Console.WriteLine("{0} {1} {2} {3}",m.Id, m.Start.DateTime, m.End.DateTime, m.Subject); // 152
Console.WriteLine(DateTime.Parse(m.Start.DateTime));
return true;
});

await pageIterator.IterateAsync();

 

All non cyclical events have corect time and date.

All cyclical events have invalid time (-2 hours)

Yesterday (21/06/2021) it was working correctly

0 Replies