web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Portal time zone showi...
Power Pages
Answered

Portal time zone showing UTC instead of local user time.

(0) ShareShare
ReportReport
Posted on by 5

We're using the nonprofit volunteer management/engagement. The datetime is set to PST in the power app form. However, in the Portal it's showing 8 hours ahead. The field is set to user local time. Anything that needs to be adjust on the portal side of things?

Categories:
I have the same question (0)
  • Verified answer
    Fubar Profile Picture
    8,365 Super User 2025 Season 2 on at

    You have to be careful with user local date-time fields.  These fields will attempt to convert to the users location timezone, for Dataverse Model Driven App this is from the User's personal settings (only), for other interfaces Canvas App/Portal this can be from the Browser or Machine the user is using (i.e. the timezone conversion is not something that you set in Dataverse other than indicating that a conversion may be required by the type of date defined).

    You can confirm this by simulating a timezone change in Chrome in the Console (F12) under the 3 dots top right then more tools -> Sensors  and then change the Location to a different timezone -then if the date or time changes after you refresh the browser you know it is picking up the locale form the browser/machine.

  • acastner Profile Picture
    on at

    Im struggling with similar issues, since the Volunteer Engagement makes native fetchxml calls in liquid, there's no timezone handling as date/times returns for those kinds of queries are in UTC. 

  • acastner Profile Picture
    on at

    If you want a solution specific to the Volunteer Engagement Solution provided by the folks at TSI...here's what I did. 

     

    #1 Adjusted the sites "Header" Web Template and added the following to the very bottom of the template. See "Header_Changes.png" 

    /*NOTES: 6/23/23 Alex Castner created a global solution to timezone issues. Make sure innerText string is formatted in zulu time (ex: 2023-06-23 12:00:00Z). */
    $('.adjusttolocaltimezone').each(function(i, obj) {
    const date = new Date(obj.innerText);
    obj.innerText = date.toLocaleTimeString('en-us',{year: 'numeric', month: 'numeric', day: 'numeric', hour: '2-digit', minute:'2-digit', timeZoneName:'short'});
    });
     
    #2 Tagged any HTML elements I wanted with class="adjusttolocaltimezone" and made sure that the time strings were in Zulu time. With liquid templates you can adust times to Zulu with the "date:'u'" date format request parameters. 
     
    Now my shifts grid on the engagement opportuntity details page looks like "Final Result.png"
     
    Feel free to reach out if you have add'l q's.
  • TreeHuggingSysAdmin Profile Picture
    5 on at

    @alexcastner, you're a legend! Thanks for the detailed instructions. I did eventually find a way to fix the time on the schedule table by changing the datetime column setting to "Time zone independent". Although, it turns out this change is irreversible... 

     

    While that fixed the table view, I'm still seeing issue with the time in the engagement title (see attached). Are you seeing time discrepancy there since making those changes? Note, the time will only show if it's a single day event. 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 78 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 75

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard