cancel
Showing results for 
Search instead for 
Did you mean: 

DatePicker automatically changes initial time in SPO list item

# Background:

I have created a test list, and added a standard out of the box Date and time column. The SharePoint list is set to (UTC) Dublin, Edinburgh, Lisbon, London.

I integrated the form (Integrate > Power Apps > Customize form), and added standard out of the box DataCard with DateValue property set from Local to UTC (Properties > Date time zone > UTC), as I want the date to be stored in UTC.

 

# Behaviour:

While creating a list item and put the date/time in the picker 2:00 am. When I save it, it is adjusted automatically for me and it is displayed back as 3:00 am.

When I go back and edit the list item, the DatePicker automatically changes the initial value and changes it to 05:00 by adding two additional hours, as shown on the screenshot below:

Screenshot 2022-06-07 at 18.29.32.png

 

If I save and edit the list item again, the DatePicker again changes the values and adds two additional hours:

Screenshot 2022-06-07 at 18.42.21.png

 

My understanding is that the Power App is making the adjustment, because it is taking actually the browser/machine system time zone. However behavior is incorrect, because the Date/time card is set to UTC and should save and display back the time in UTC.

In addition, the initial time value in the list item shouldn’t be changed when the list item is being open to be edited again.

 

I was in contact with the PowerApps support and was provided with the workaround to update the DataCard with some expressions in order to convert between local time and UTC.

I was told as well that this is not a bug, but rather a limitation in connection between SPO list and PowerApps. The TimeZone property of the DatePicker applies only to that control, and the dropdowns are not affected by the change. The TimeZone property was added long time ago and the Data Cards were introduced at later point, so updating the expressions on both the date picker and the dropdown controls was the only way to make this scenario work.

 

In my opinion this is a design flaw that should be corrected, the reason being that just selecting standard capabilities (out of the box date/time card) it can lead to a data corruption.

 

 

 

 

 

 

 

 

Status: New