cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tia
Resolver I
Resolver I

Times incorrectly displaying after UTC interpretation but only wrong for One user

Hi All, 

 

I have an app that is used to create calendar invites with its tables within Dataverse and I have a single user who is for some reason coming up an hour off, every other user seems to be fine. 

 

The example is the user is selecting a time period of 11am - 1pm and for some reason the time is interpreting it to 10-12.

Tia_1-1631757008081.png

On Select Sets:

Set(FollowUpStart,ThisItem.StartTime);
Set(FollowUpEnd,ThisItem.EndTime);

The time is collected in UTC format and then displayed as +10 (Australian Eastern Standard time) - this seems to work fine for everyone else.

 

Tia_0-1631756970229.png

StartTime Date: DateAdd(DateTimeValue( FollowUpStart, "en"),10,Hours)

StartTime Hours: [Text(DateAdd(DateTimeValue( FollowUpStart, "en"),10,Hours),"hh")]

StartTime Minutes: [Text(DateAdd(DateTimeValue( FollowUpEnd, "en"),10,Hours),"hh")]

 

For some reason, this user then has the time above as 10 and 12 and this then pushes through a wrong time period of the event. 

The User is in the same region as everyone else, so I don't believe that its something to do with the UTC but I'm at a total loss. 

 

Any help would be wonderful. Thanks in advance!

 

 

 

 

 

10 REPLIES 10
dpoggemann
Super User
Super User

HI @Tia ,

 

Just a couple of things to verify:

1.  Can you have the user check their timezone in Power Apps personal settings?  https://docs.microsoft.com/en-us/powerapps/user/set-personal-options 

Are they setup any differently than anyone else?

2.  How is the field defined in the Dataverse?  Is it Time Zone Independent (https://docs.microsoft.com/en-us/powerapps/maker/data-platform/behavior-format-date-time-field) vs. User Local?  If it is user local this could have an impact.  There are also good best practices in the article.

 

Hope this helps.  Please accept if answers your question or Like if helps in any way.


Thanks,


Drew

Hi Drew, 

 

Thank you for your response! The apps I am building are canvas and in the settings screen for this section, I haven't been able to find the personalization settings, it appears to be for model-driven apps?

 

Do you have any other ideas? I really appreciate the help!

 

Tia

dpoggemann
Super User
Super User

Hi @Tia ,

Since this is a canvas app, please follow these steps:

1. User can launch the app and there should be a "gear" icon on the top right of the screen, see left of the ? mark...

Screen Shot 2021-09-20 at 7.31.29 PM.png

2.  From here you will see "Office 365" and choose to view all

3.  Go into Contact Preferences from here

4.  Language and Region (Preview) and from here you can check the timezone setting for that user

Screen Shot 2021-09-20 at 7.31.01 PM.png

 

Hope this helps.  Please accept if answers your question or Like if helps in any way.

 

Thanks!

Drew

Tia
Resolver I
Resolver I

Thank you, the above really helped. I have been able to go through each suggestion.

 

So, we have established the users (we found another one) are set up with the appropriate timezones. Both their computers and powerapps settings are at the appropriate time.

Tia_0-1632366924054.png

The app is also set to Local because if we set it to UTC it brings in the wrong information for the Calendar event. 

Tia_1-1632367051642.png

So when a person selected check for availability between 9am and 5pm it gives something like

Tia_2-1632367190999.png

 instead of 

Tia_3-1632367236720.png

which is obviously not what im aiming for... 

 

I am at a bit of a loss of where to go from here. Any other thoughts would be wonderful. 

Fubar
Solution Sage
Solution Sage

Have you checked the current Date and Time settings that are currently set on the Device the user is using. 

Hi Fubar, 

 

Yes, validated that they align with my own. Which is one of the reasons this is all very weird. 

At 11am, they also had 11am on their screen as we screen shared and discussed. 

dpoggemann
Super User
Super User

Hi @Tia ,

 

Can you add a screen to your application and display the following for the user to help debug this?

1. Text( Now(), "mm/dd/yyyy hh:mm:ss" )

 

I would also, if possible have the user logout of their machine and have another user login to the same machine and see if it is an issue tied to the user vs. the machine.  If it works for one user and not the other and the current time shows differently then their is something that is seeing the user's timezone differently.

 

There are also extensions to change timezone in browsers like Google Chrome but I assume this is not the case here.  I think the above test will help determine where the source is more...

 

Thanks,


Drew

dpoggemann
Super User
Super User

Hi @Tia ,

 

Did you have a chance to try the options I suggested?  Any feedback?

 

Thanks,


Drew

Hi Drew, 

 

With your suggestion, I added text labels for every date time display. This really helped. 

I think we've figured out that it was the interpretation of the value from the button press of our select meeting time. 

Tia_0-1632794808372.png

Text formula: 

If(!IsBlank(ThisItem.Data.MeetingTimeSlot),
/*
Retrieved times are in UTC. This converts and displays them to local region time
*/
Text(DateAdd(DateTimeValue(ThisItem.StartTime), -TimeZoneOffset(DateTimeValue(ThisItem.StartTime)), Minutes), "[$-en-US]hh:mm AM/PM") & " - " &
Text(DateAdd(DateTimeValue(ThisItem.EndTime), -TimeZoneOffset(DateTimeValue(ThisItem.EndTime)), Minutes), "[$-en-US]hh:mm AM/PM")
)

 

OnSelect: 

Set(FollowUpStart,ThisItem.StartTime);
Set(FollowUpEnd,ThisItem.EndTime);

 

I was then doing an interpretation of that value and adding 10hours. 

StartTime Date: DateAdd(DateTimeValue( FollowUpStart, "en"),10,Hours)

StartTime Hours: [Text(DateAdd(DateTimeValue( FollowUpStart, "en"),10,Hours),"hh")]

StartTime Minutes: [Text(DateAdd(DateTimeValue( FollowUpEnd, "en"),10,Hours),"hh")]

 

This is where I went wrong. For some reason, and today it actually happened to me - people would come up with the hour off. Which made me dig back into the pieces. 

 

My colleague and I worked out that we need to match the original format allowing the app to do the time conversion instead of me just trying to add that time conversion myself. The below formulas are where we landed.

Tia_1-1632795071494.png

 

[Text(DateAdd(DateTimeValue(FollowUpStart), -TimeZoneOffset(DateTimeValue(FollowUpStart)), Minutes), "[$-en-US]hh")]

[Right(Text(DateAdd(DateTimeValue(FollowUpStart), -TimeZoneOffset(DateTimeValue(FollowUpStart)), Minutes), "[$-en-US]hh-mm"),2)]


[Text(DateAdd(DateTimeValue(FollowUpEnd), -TimeZoneOffset(DateTimeValue(FollowUpEnd)), Minutes), "[$-en-US]hh")]

[Right(Text(DateAdd(DateTimeValue(FollowUpEnd), -TimeZoneOffset(DateTimeValue(FollowUpEnd)), Minutes), "[$-en-US]hh-mm"),2)]

 

Thank you so much for your help. I don't think we would have found an appropriate solution without your guidance. 

 

Tia

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,518)