cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate IV
Advocate IV

Offset gallery by one hour

DateTimeValue("2019-02-27T10:00:00.000Z") gives me :

2/27/2019 11:00 AM

I suspect this has to do with my current timezone (GMT+1).
Why would the function act this way though? If I pass a string to DateTimeValue I expect it to assume I'm passing it in with my own local timezone..

Seems like a bug to me

 

1 ACCEPTED SOLUTION

Accepted Solutions
Power Apps
Power Apps

Re: Offset gallery by one hour

If the string you pass to the DateTimeValue function does not have a time zone specifier, then it will be parsed in your own time zone. However, the specifier 'Z' that you have at the end of the string indicates that the value is from UTC, per the ISO 8601 format. If you remove it:

DateTimeValue("2019-02-27T10:00:00.000")

Then it will interpret the value as local (and you'll see "2/27/2019 10:00 AM" as you expect).

Hope this helps!

View solution in original post

2 REPLIES 2
Power Apps
Power Apps

Re: Offset gallery by one hour

If the string you pass to the DateTimeValue function does not have a time zone specifier, then it will be parsed in your own time zone. However, the specifier 'Z' that you have at the end of the string indicates that the value is from UTC, per the ISO 8601 format. If you remove it:

DateTimeValue("2019-02-27T10:00:00.000")

Then it will interpret the value as local (and you'll see "2/27/2019 10:00 AM" as you expect).

Hope this helps!

View solution in original post

Highlighted
Advocate IV
Advocate IV

Re: Offset gallery by one hour

Thank you, I removed the Z-value from my datetime string and it worked just fine!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,996)