cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
andyJDL Helper I
Helper I

PowerApps time zone error

I have an app using local times data generated in Hawaii (for instance 8am).  

 

When viewing the app in NC, it should read as 6 hrs earlie (so 2am), but it shows up in PowerApps as 4 hours earlier (4am).

 

Anyone have a suggestion?  I've checked my time zone settings in my Office 365 profile, Outlook, and in Dynamics.

 

Andy

5 REPLIES 5
samuelJ Responsive Resident
Responsive Resident

Re: PowerApps time zone error

What is your flow of information?  Where is the time being stored in between sessions? For example we use PowerApps > SSMS > PowerApps.

andyJDL Helper I
Helper I

Re: PowerApps time zone error

I'm not sure how to answer that questions, but the data is on a Hawaii server with an on-premise gateway connecting two SQL databases, which are sharing data to the PowerApp.

 

Andy

samuelJ Responsive Resident
Responsive Resident

Re: PowerApps time zone error

Yes I was asking where you data was being stored, SQL server, share point, etc.  Looks like SQL Server 

 

I had a similar issue, we enter a date/time in powerapps and it gets stored in sql server, later we pull it back into powerapps to view, people in many different timezones use this app.  Our problem was that powerApps would take the local time zone the date/time was being entered in, convert that to UTC for sql server and then back to local time zone for what ever device was trying to view the time.  So it could have been PST > UTC > HKT so we ended up with lots of different problems.

 

To solve it we did this when writing to the DB:

 

DateAdd( SomeDateValue , -TimeZoneOffset(Now()), Minutes)

Then when reading from the DB we did this. 

DateAdd( SomeDateValue , TimeZoneOffset(Now()), Minutes)

 

 

 

 

 

andyJDL Helper I
Helper I

Re: PowerApps time zone error

Thanks, 

 

I get that PowerApps converts to the local time of the user, but this appears to be different from that.

All of the data is written in Hawaii, so in theory 8am Hawaii should get converted to 2am in NC.  But instead the app shows it as 4am.  I can't seem to figure any logic that would cause that.

 

Am I missing some aspect of the problem you experience that might be more similar than I realize?

Highlighted
samuelJ Responsive Resident
Responsive Resident

Re: PowerApps time zone error

@andyJDL,

 

**My solution assumes you are not trying to format the time anywhere in powerApps or somewhere else but using the local time on the device. 

 

I apologize if I am not explaining this correctly.  Time zones are very frustrating in PowerApps.  I know what your problem is, I am having trouble explaining it. 

 

8:00 AM in Hawaii is 2:00 PM in EST.  

 

Capture.PNG

So your logic is PowerApps > SQL Server > PowerApps.  8:00 AM Hawaii time in powerApps, gets put into SQL Server as UTC (6:00 PM), then that gets put back into powerApps.  So (Here I assume you are trying to tell powerApps to use Hawain time, which is how you get 4 AM) 6PM UTC (being read as HST, if you are specifiying this) = 4:00 AM.  If you do the above code I showed, it should fix this problem.  

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

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