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

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
Highlighted
Community Support
Community Support

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

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