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 Apps / Date Picker off by 23 ...
Power Apps
Unanswered

Date Picker off by 23 hours when its DateTimeZone is set to UTC - bug?

(0) ShareShare
ReportReport
Posted on by 101

I've run in to what I think is a bug in DatePicker.

 

I live in the UK, so I currently am on UTC+1 (British Summer Time).

 

When I set a Date Picker's DateTimeZone property to DateTimeZone.Local, SelectedDate shows the same date, and Text() function converts this to a UTC time 1 hour compared to what it would be in my local time. All correct.

 

However, when I set its DateTimeZone property to DateTimeZone.UTC, SelectedDate shows a date one day before. Text() duly converts this to a time wrong by 23 hours.

firefox_bS4OnkvIvs.png

Am I right in thinking this is indeed a bug?

Categories:
I have the same question (0)
  • iltoningui Profile Picture
    247 on at

    Hi @Spinner,

     

    This behaviour is due to the fact that the selected value is actually datetime and not date.

    The default value is TODAY() returns the current datetime 21/07/2021 00:00:00 at midnight if you change the time zone in this conditions it might affect the date.

     

    If you are not using the component to select date not time, you should stick with Local as your time zone.

     

  • Spinner Profile Picture
    101 on at

    Hello @iltoningui,

     

    Thank you for the reply.

     

    I don't think it is related to the default value: this apparent error occurs whichever date I select (see below for an example on a different day).

    firefox_XHNiNiUQc6.png

    As you can see, after selecting 1 July 2021 in dte_2, the datetime value stored in SelectedDate is a whole day off what I would expect it to hold. Instead of 2021-07-01T00:00:00.000Z, it shows 2021-06-30T00:00:00.000Z.

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 759 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 310 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 228

Last 30 days Overall leaderboard