SOLVED

Time zone issue with SharePoint calendars

%3CLINGO-SUB%20id%3D%22lingo-sub-195468%22%20slang%3D%22en-US%22%3ETime%20zone%20issue%20with%20SharePoint%20calendars%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-195468%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20using%20PnP%20js%20core%20to%20aggregate%20items%20from%20multiple%20SharePoint%20lists%2C%20including%20Tasks%20lists%20and%20Calendar%20lists.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20getting%20all%20times%20in%20UTC%2C%20except%20for%20calendar%20all%20day%20events%20whose%20times%20are%20off%20by%20several%20hours.%20How%20are%20those%20all%20day%26nbsp%3Bitems%20stored%2C%20and%20is%20there%20a%20standard%20way%20on%20the%20client%20side%20to%20re-align%20their%20dates%20with%20other%20items%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-195468%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPnP%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Epnpcore%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-196023%22%20slang%3D%22en-US%22%3ERe%3A%20Time%20zone%20issue%20with%20SharePoint%20calendars%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-196023%22%20slang%3D%22en-US%22%3EThank%20you.%20Just%20removing%20the%20%22Z%22%20for%20all%20day%20events%20fixed%20the%20issue.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-195700%22%20slang%3D%22en-US%22%3ERe%3A%20Time%20zone%20issue%20with%20SharePoint%20calendars%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-195700%22%20slang%3D%22en-US%22%3EDid%20you%20check%20out%20this%20article%3F%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FSharePoint%2FPnP%2Ftree%2Fmaster%2FSamples%2FCore.DisplayCalendarEvents%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FSharePoint%2FPnP%2Ftree%2Fmaster%2FSamples%2FCore.DisplayCalendarEvents%3C%2FA%3E%3C%2FLINGO-BODY%3E
Highlighted
Frequent Contributor

I am using PnP js core to aggregate items from multiple SharePoint lists, including Tasks lists and Calendar lists.

 

I am getting all times in UTC, except for calendar all day events whose times are off by several hours. How are those all day items stored, and is there a standard way on the client side to re-align their dates with other items?

2 Replies
Highlighted
Best Response confirmed by Christophe Humbert (Frequent Contributor)
Highlighted
Thank you. Just removing the "Z" for all day events fixed the issue.