web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / wrong time in sharepoi...
Power Apps
Answered

wrong time in sharepoint list how to patch UTC time?

(1) ShareShare
ReportReport
Posted on by 87

hello everyone,

 

I realized in my sharepoint list the submitted time from power apps is -9 hours. When I display the started time in my gallery its correct. I set the regional time correctly but after trying again its still wrong.

 

How do I patch it via power apps correctly?

 

This is what I tried:

 

Set(MyLocalTime; Now());

Set(UTC_Time; DateAdd(MyLocalTime; -9; Hours));

Patch(user_logins; Defaults(user_logins); { UTC_Time: UTC_Time });

any suggestions?

Categories:
  • Verified answer
    poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @apca 

     

    It looks like you're encountering a common issue when dealing with times in Power Apps and SharePoint.

     

    SharePoint often handles dates in UTC format. So when you submit a local time from Power Apps, SharePoint may be interpreting that as a UTC time, which could explain the 9-hour difference you're experiencing.

     

    To address this, we can convert the local time to UTC before Patching to SharePoint.

     

    To make this conversion, we should adjust for the time zone difference.

     

    The function TimeZoneOffset() could be useful here. It returns the difference in minutes between your local time and UTC. You can use this to adjust your local time to UTC like this:

    Set(UTC_Time; DateAdd(Now(); TimeZoneOffset(Now()); Minutes));
    

    Your Patch function should then look something like this:

    Patch(user_logins; {ID: myitemtochange.id, UTC_Time: UTC_Time})
    

    See if it helps @apca 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 258

#3
Mohsin Ali Profile Picture

Mohsin Ali 231

Last 30 days Overall leaderboard