GetItems from a SharePoint list will convert the DateOnly field to the site time zone?

I have a SharePoint list with a column of type DateTime (DateOnly) field named StartDate1, and our site collection has UTC+2 time zone.

Now when i directly use SharePoint REST API "/_api/web/lists/getbytitle('bookingcalendardetails')/items(1238)", i will get this value for the DateOnly field:-

<d:StartDate1 m:type="Edm.DateTime">2024-10-27T22:00:00Z</d:StartDate1>

But when i run the GetItems action, it will convert the above Date into 28/10/2024, which is based on the site time zone?

enter image description here

So can i conclude that GetItems is smart enough to convert the value returned from SharePoint API into the site time zone regional settings? Although for the Created date the time returned by the GetItems will be in UTC and not in the site time zone as follow:-

enter image description here

So this is a bit confusing? the question is how GetItems treat the DateOnly fields and the Datetime fields in respect to the site local time zone?

Upvotes: 0

Views: 57

Answers (1)

Farkas J&#225;nos
Farkas J&#225;nos

Reputation: 196

I am not sure what is your exact question, but you can convert the time zone with a function in PowerAutomate: convertTimeZone(), etc: convertFromUtchttps://learn.microsoft.com/en-us/power-automate/convert-time-zone

Upvotes: 0

Related Questions