cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SamBa
Level: Power Up

Time zone from user profile not applicable

Hi Together,

 

I´m using an app in powerapps where I need to get start time from onclick event. Unfortunately the time is always wrong and not in the time zone from the user profile. I´m saving these data in CDS. What am I doing wrong? How can I convert the time in CET Time? This is the code Snippet(the Variable var_SchichtEndTime needs to be converted in CET or to use User Time Zone):

 

Reset(ti_ausschuss);; Reset(ti_gutstueck);; If(IsBlank(var_MachineState);Navigate(scr_Schicht;ScreenTransition.None);Set(var_showPopupSchicht;true);;Set(

    var_SchichtEndTime;

    Now()

))

 

Attached you can see that the Datatyp is correct and should use users time zone.

 

Thank´s for your help!

1 REPLY 1
Community Support Team
Community Support Team

Re: Time zone from user profile not applicable

Hi @SamBa ,

The Time Zone of your PowerApps is based on your local time zone in default.

It is concered by your current location, not the loaction that you set in user profile.

If you want to set the Time Zone for PowerApps dynamically, I afraid that there is no way to achieve your needs in PowerApps currently.

 

As an alternative way, I suggest you customize the time that returns.

But firstly you need to know the time zone that you want.

Then, convert current time to UTC:

Set(utctime,DateAdd( Now(), TimeZoneOffset(), Minutes ))

Convert UTC to the time zone that you want:

Set(var_SchichtEndTime,DateAdd( utctime, -timezone*60, Minutes ))

Please replace timezone with the one that you want.

Here'a doc about how to convert time to UTC for your reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-dateadd-datediff

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (3,064)