0
votes

I am working on an online SharePoint site collection, which have the following regional settings:-

enter image description here

and I hosted a remote event receiver inside azure web app,where the remote event receiver will get fired when adding/updating list item. now inside the remote event receiver i have the following code to get a DateTime value named ApproveDate:-

DateTime approveBy = (DateTime)projectItem["ApproveDate"];

but if the user enter a value for the ApproveDate equal let say 30/09/2020 inside the SharePoint form as follow:-

enter image description here

then the DateTime value inside the remote event receive will be 9/29/2020 8:00:00 PM instead of 9/30/2020 00:00:00 AM.. so why i am facing this issue? is this because the azure web service have different time zone compared to the SharePoint site? and how i can fix this?

1
Has your problem been solved? Is there any progress? - Jason

1 Answers

0
votes

I think this is no problem.

Assuming that the time zone of our web application server IIS is UTC time, then the parameter time passed by your SharePoint is 9/30/2020 00:00:00 AM, and the IIS server time to the web should be minus 4 hours. The time stored by the IIS server is correct. When the front end needs to return, it is UTC+4 hours.

For our program, we should get the parameters of the Sharepoint part of the front-end page, such as time zone and other information, and then we can do the corresponding processing in the code when we return.