cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
quail
Frequent Visitor

Potential Bug: Wrong time saved to SharePoint from Canvas App on the Sunday of Daylight Savings

I have a Canvas App with a SharePoint Online List as a data source. It has two Date/Time columns. When creating a new event through the Canvas app for November 7, 2021, the switch over for Daylight savings, it will save the wrong time to SharePoint. For example, if I enter 10am in the app, it will save as 9am to SharePoint. It will display as 9am in the app as well. 11/6 and 11/8 save correctly. I imagine this will be the same for the Spring change over as well. 

I am in the US in the Eastern Time Zone. 

 

Updating with the below information: 

I am using the out of the box Edit Form in Canvas app to write to a SharePoint list. The update formula for the date/time card is:

 

 

DateValue.SelectedDate + Time(Value(HourValue.Selected.Value), Value(MinuteValue.Selected.Value), 0)

 

 


For all days except the DLS change over days, like 11/7, it works fine. Only on 11/7 is the time wrong. 

I recently discovered that if you DateDiff Between 11/7 and 11/8 you get 25 hours. The spring change over is 23 hours. 

 

 

25 hours = DateDiff( 11/7 12AM, 11/8 12AM, Hours)

 

 


This suggests to me that there might be something off in how Power Apps is calculating the hours on these days

 

To test this, place a Datapicker on the screen. Add a label and put the following formula:

DateDiff(DatePicker.SelectedDate, DateAdd(DatePicker.SelectedDate, 1, Days), Hours)

 

2 REPLIES 2
StalinPonnusamy
Community Champion
Community Champion

Hi @quail 

 

Did you tried to convert the date to UTC time like

StartDate: DateAdd(DateField, TimeZoneOffset(),Minutes)

 

hello @StalinPonnusamy , 

 

Thank you for responding. 

However, this solution did not work. I believe Canvas apps speaks with SharePoint in Local Time. Using this formulae saved the times in the adjusted UTC time, so for 10am it saved as 2pm on 11/7, on 10/1, as 1pm. 

Let me provide a little more information. 

 

I am using the out of the box Edit Form in Canvas app to write to a SharePoint list. The update formula for the date/time card is:

 

DateValue.SelectedDate + Time(Value(HourValue.Selected.Value), Value(MinuteValue.Selected.Value), 0)

 


For all days except the DLS change over days, like 11/7, it works fine. Only on 11/7 is the time wrong. 

I recently discovered that if you DateDiff Between 11/7 and 11/8 you get 25 hours. The spring change over is 23 hours. 

 

25 hours = DateDiff( 11/7/2021 12AM, 11/8/2021 12AM, Hours)

 


This suggests to me that there might be something off in how Power Apps is calculating the hours on these days. 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,000)