cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GunnerJoe
New Member

Time Setting difference between Power Apps and SharePoint/OneDrive for Biz

I am building a basic Power App the is using Excel Online as the data source. One of the Excel columns is Time - as in an appointment time. For the time to render in the Power App I am using the following: Property is set to Text - formula is Text(DateAdd(ThisItem.AppointmentTime, TimeZoneOffset(Now()), Minutes), "h:mm AM/PM"). This works great with the exception that is it off by one hour- example Excel cell is 9:30 AM; Power App renders this as 8:30 AM. It looks like this is due to a difference in UTC Time settings - SharePoint/OneDrive is UTC minus 8 (I am in the PDT timezone) where as the Power App function TimeZoneOffset is set to 420 minutes or UTC minus 7 hours. PowerApps is the correct time due to daylight savings time. 

 

Any thoughts on how to hack this? 

 

1 ACCEPTED SOLUTION

Accepted Solutions

You need to supply the date of the appointment as a parameter inside the timezoneoffset() to get it to adjust correctly for daylight savings time.  If the appointment date isn't the same as Now() you'll get the wrong offset.

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

3 REPLIES 3
Pstork1
Dual Super User
Dual Super User

Power apps has a TimezoneOffset() function that can be used to adjust for daylight savings time in a particular locale. DateAdd, DateDiff, and TimeZoneOffset functions in Power Apps - Power Apps | Microsoft Docs



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
GunnerJoe
New Member

Thanks @Pstork1 . I am using the TimezoneOffset() function to adjust for daylight savings time (UTC minus 7 for Pacific Daylight Time). When I look in the settings for SharePoint/OneDrive the time is set for UTC minus 8 - which I think this is the issue why the date in my Excel spreadsheet (hosted in OneDrive) is different by one hour than what is rendered in my Power App.  Maybe this question needs to be asked in a different forum - SharePoint Online/OneDrive forum? 

You need to supply the date of the appointment as a parameter inside the timezoneoffset() to get it to adjust correctly for daylight savings time.  If the appointment date isn't the same as Now() you'll get the wrong offset.

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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