Skip to main content
Community site session details

Community site session details

Session Id : Lo9U9sZ9mdPM9xy2xt1Coh
Power Apps - Building Power Apps
Answered

Time and TimeZone

Like (0) ShareShare
ReportReport
Posted on 13 Oct 2021 13:48:36 by 5,836 Super User 2025 Season 1

Time and TimeZone challenge.   I know how to use the TimeZoneOffset, but am not sure if or how to use it to accomplish what I need to accomplish.

 

Here is the challenge. 

 

Users - anywhere in the world

 

Challenge:  Regardless of where the user of the app is located, I need to be able to determine if the time in CDT Timezone (UTC -06:00 or -05:00 during DST) is >= 11am and if so change the information that is being displayed.   

 

Categories:
  • JR-BejeweledOne Profile Picture
    5,836 Super User 2025 Season 1 on 19 Oct 2021 at 14:41:48
    Re: Time and TimeZone

    I did come up with a possibility.   In working with something totally unrelated to Power Apps, I discovered that our SharePoint online tenant time is Pacific Time.   I could conceivably create an event calendar, and put a single repeating entry on it, (repeats every week at the time I want to switch), that I could use as the base for the time calculation.

     

    I think I can figure something out using that.   I just haven't had time to look at it yet.

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on 13 Oct 2021 at 15:02:07
    Re: Time and TimeZone

    @JR-BejeweledOne 

    Yes, wishful thinking!! 😉  I would settle with even some basics like getting back the current location and possibly even something that indicates if it is standard or daylight savings.  Especially since you need this type of info for a lot of the calendaring actions on connectors.  

    Oh well...workarounds it is for now.

  • JR-BejeweledOne Profile Picture
    5,836 Super User 2025 Season 1 on 13 Oct 2021 at 14:53:20
    Re: Time and TimeZone

    Too bad MS doesn't incorporate the TZ database so it can be used in these sorts of calculations.

     

    https://en.wikipedia.org/wiki/Tz_database

  • Verified answer
    RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on 13 Oct 2021 at 14:10:33
    Re: Time and TimeZone

    @JR-BejeweledOne 

    You will need to determine the timezone for CT first.  Your real challenge will be with the DST aspect.  You will not be able to rely on that as it will give you different results based on different regions.  Even parts of the US don't use DST, so those would always return a standard time.

    Ideally you would want to convert all times CT and anywhere in the world, to standard time first.  That will be the base line.  To really put the logic in to do that, you need to put in the DST start and end dates.  BUT, this still represents a problem with regions that don't use DST...as you'll not be able to get that region information.

     

    SO, how to really combat this issue is going to be to think outside the box (or outside the app in this case).  You can consider employing a web service that will return current time for a specified region.  I can't name any off hand, but there are such services out there that can provide an API to do this.

    The other option is to (since you want everything based off of the CT current hour), employ a flow that will run every hour and will update a list with the current CT hour.  Then your app, anywhere in the world, can grab that from the list and use it in the comparison.

     

    It's painful indeed as there is no real way to get specific region information in the app, so you kind of have to augment it.  I know I've dealt with this with US-wide app (especially dealing with the regions that never observe DST) and the solution there was capturing the local date and time in the app and storing it as static text (not a date type column).  Then, for comparison, the app grabs from the list that has the "central home" date and time.

     

    Hopefully this gives you some ideas to consider.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1

Loading complete