cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

Now() is correct in PowerApps but wrong once pushed to SharePoint via Patch()

I have a Visitor Management Solution PowerApp which checks users in and out of an office.

 

On button click following the check-in process, I am running a Patch() command to take the current time via Now() and store this value as a timestamp to a list in SharePoint Online.

 

Now() shows the correct local time in PowerApps, but once this value is pushed to SharePoint, the value is two hours in the past. I'm in CST. What's the recommendation here? Is this simply a bug?

 

This is not a "your time-zone is wrong in SharePoint" issue.

 

I can do something like DateAdd(Now(), -2, Hours) in order to get the data pushed to SharePoint correctly but then I'll have to make the same correction/conversion everywhere in my app where this date-time is returned and shown. This approach would also not support situations where multiple time-zones are in play which will be common for me moving forward.

6 REPLIES 6
Highlighted
Advocate II
Advocate II

Re: Now() is correct in PowerApps but wrong once pushed to SharePoint via Patch()

Just checking back in, can anyone help on this issue?

Highlighted
Advocate II
Advocate II

Re: Now() is correct in PowerApps but wrong once pushed to SharePoint via Patch()

bump, any assistance here would be appreciated. 

Highlighted
Helper IV
Helper IV

Re: Now() is correct in PowerApps but wrong once pushed to SharePoint via Patch()

Any luck? I have the same issue

Highlighted
Helper IV
Helper IV

Re: Now() is correct in PowerApps but wrong once pushed to SharePoint via Patch()

Bump

Highlighted
Community Champion
Community Champion

Re: Now() is correct in PowerApps but wrong once pushed to SharePoint via Patch()

Hi All,

 

I found a similar thread that discusses timestamps in SharePoint. Please review the following and let me know if it's helpful 

 

https://powerusers.microsoft.com/t5/Expressions-and-Formulas/Write-Date-Time-to-Sharepoint/td-p/1594...

 

@TopShelf-MSFT 

Highlighted
Frequent Visitor

Re: Now() is correct in PowerApps but wrong once pushed to SharePoint via Patch()

think you have to use utcnow() so it adapts to the end-user's timezone. Could be wrong though.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (6,378)