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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (10,306)