cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DAVIDPOWELL
Post Prodigy
Post Prodigy

How to check if DST (Daylight Saving Time) is in effect

Is it possible in powerapps to check and see if DST is in effect on someone's laptop and/or device?

 

If so how can this be modified ?

If(TimeZoneOffset() > 0, "-", "+")
& RoundDown(Abs(TimeZoneOffset()) / 60, 0)
& ":"
& If(Mod(Abs(TimeZoneOffset()), 60) < 10, "0", "")
& Mod(Abs(TimeZoneOffset()), 60)

 

Thanks

Dave

1 ACCEPTED SOLUTION

Accepted Solutions
poweractivate
Community Champion
Community Champion

@DAVIDPOWELL 

 

Suppose a Label called Label2

 

In this Label called Label2, for Text property, use only part of your original formula like this:

 

 

If(TimeZoneOffset() > 0, "-", "+")
& RoundDown(Abs(TimeZoneOffset()) / 60, 0)

 

 

Suppose another Label called Label3

 

In this Label called Label3, for Text property, use a formula like this:

 

 

If(Value(Label2.Text) = -7,"MST",If(Value(Label2.Text) = -6,"MDT","Other"))

 

 

Now, you can temporarily change the Text property of Label2 to simulate expected values.

Change Text property of Label2 to -8. Label3 text should now say Other

Change Text property of Label2 to -7. Label3 text should now say MST

Change Text property of Label2 to -6. Label3 text should now say MDT

 

Now, change Text property of Label2 back to the correct real formula:

 

 

If(TimeZoneOffset() > 0, "-", "+")
& RoundDown(Abs(TimeZoneOffset()) / 60, 0)

 

 

Check if something like the above helps you.

View solution in original post

1 REPLY 1
poweractivate
Community Champion
Community Champion

@DAVIDPOWELL 

 

Suppose a Label called Label2

 

In this Label called Label2, for Text property, use only part of your original formula like this:

 

 

If(TimeZoneOffset() > 0, "-", "+")
& RoundDown(Abs(TimeZoneOffset()) / 60, 0)

 

 

Suppose another Label called Label3

 

In this Label called Label3, for Text property, use a formula like this:

 

 

If(Value(Label2.Text) = -7,"MST",If(Value(Label2.Text) = -6,"MDT","Other"))

 

 

Now, you can temporarily change the Text property of Label2 to simulate expected values.

Change Text property of Label2 to -8. Label3 text should now say Other

Change Text property of Label2 to -7. Label3 text should now say MST

Change Text property of Label2 to -6. Label3 text should now say MDT

 

Now, change Text property of Label2 back to the correct real formula:

 

 

If(TimeZoneOffset() > 0, "-", "+")
& RoundDown(Abs(TimeZoneOffset()) / 60, 0)

 

 

Check if something like the above helps you.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,548)