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 Apps
Unanswered

Bizarre Date Issue

(0) ShareShare
ReportReport
Posted on by 5,836 Moderator

I have a Holiday calendar app.  The gallery that displays the company holidays for the selected location is displaying a filtered collection of holidays that is gathered on App start from the SharePoint list.    The date displayed is a Date/Time (Date Only) field.

 

I have reports from a few people that the dates being displayed are consistently 1 day earlier than they should be.    We have checked numerous things from their computer time settings and browser settings but they are all normal.

 

In troubleshooting the app, I have used the TimeZone offset to capture the local time.   Per MS by default it should show the current date/time without having to pass it a parameter, but it's not.   Here is what it's displaying, note the bottom label is set to display the current date/time offset.   The current time display remains the same regardless of when we look at it

 

Per Microsoft's documentation:  "TimeZoneOffset defaults to the current time, so you don't need to pass it an argument."

 

DateTimeIssueESTCorrect1.jpg

 

TimeZoneOffset for Current Date/Time

 

 

 

"Current Time: " & Text(TimeZoneOffset(), ShortDateTime)

 

 

 

 

TimeZoneOffset for UTC Date/Time

 

 

 

"UTC Time: " & DateAdd(Now(), TimeZoneOffset(), Minutes)

 

 

 

 

Here is what we are seeing:

 

SharePoint List:

DateIssueSiteRegionalSettings.jpg

 

DateIssueSharePointDates.jpg

 

Here is what it should look like in the Power App:

DateTimeIssueESTCorrect.jpg

 

Here is what the two users I am working with (1 in EST and 1 in CDT) are seeing:

 

DateIssueESTIncorrect.jpg

 

 

If you can help me figure this out, I will be eternally grateful.

 

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    One thing to be careful of is using timezoneoffset with no parameter.  You are correct that when you use it without parameter it will return the timezoneoffset for the current local time.  But if you are then using that with a time that is from a different point in the year you will be off by an hour.  timezoneoffset() needs a particular date as the parameter to decide what the current offset should be on that date for that location.  Due to Daylight savings time that will vary across a year. So timezoneoffset called without a parameter in July will be different than timezoneoffset called in January.  Unless you are working with the current date and time I would recommend always adding the date you are looking at as a parameter in timezoneoffset.

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    Right now it's there just for context to determine what is being seen by each of the people experiencing the issue.    So I need it to be the current time.   I can certainly pass Now() to it and see if that makes a difference but according to MS I shouldn't have to.

     

    I added it as an additional piece of information to determine why some people are seeing the date in the list of holidays as a day earlier.   So if the date in the SharePoint list is 1/3/2022, these people are seeing 1/2/2022.

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    You say one user is in EST and one in CDT. Shouldn't it be EST and CST?  For the Central timezone user if the Date/time is coming in as midnight 12/30 Eastern time then that is actually 11PM 12/29 in the Central timezone.  But I'm not sure what is happening for the EST user.

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    CDT is Central Daylight Time as opposed to Central Standard Time.

     

    I could understand this if everyone in the CDT/CST were seeing the dates as a day earlier.    However they aren't.   99.9% of the people are seeing the dates as they should be.   And that doesn't explain why my user whose time zone is EST, which is the same setting in the SharePoint regional settings, is seeing them as a day earlier. 

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    As I said, I can't explain the one in EST.  But Timezone settings are managed at a lot of levels besides just SharePoint.  I have to assume that something is set incorrectly for that one user's account somewhere.  I don't know where.

     

    My point about CDT is that right now the Central time zone is in CST.  CDT doesn't start until March. I live in Central time zone US.

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    I only used CDT because that's what the user said his time zone is.   We checked his browser settings and his computer settings and they are all accurate.   So I don't have a clue here.   I think I have 3 people who are experiencing the issue.

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    My last thought would be, Did you check his user profile settings in SharePoint?  User's can override the sites time zone with their own personal time zone setting in their profile.  I used to do it as a traveling trainer.  But in general I don't recommend it because it can cause confusion just like you are seeing.  I don't know that it is really surfaced anywhere anymore, but if you edit the user's profile in SharePoint Admin Center > More Features > User Profile Service you'll find a setting buried in their profile.  That can change how SharePoint acts for that particular user.

    image.png

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    I will have to look into that.  Thanks for the tip

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard