Wondering what other peoples solutions are for this oddity in Powerapps.
Say you have a date picker and your own sudo time picker, you then write a function to marry the two into a date time value and use it in your app.
This is all well and good most of the year except if you live in a country with daylight savings - even though you're using the date value for its day/month/year values and nothing more - it still seems to in the back end involve the time, so even if you apply your own time value using the "DateTimeValue" function it'll still add its own time value into the calculation meaning now your inputs are an hour off - this problem only exists for two days of the year and behaves as desired the rest of it.
Before anyone suggests it, the "TimeZoneOffset" function is no help in this situation unless you can build a check that can tell it's a daylight savings day vs a normal day 363 days of the year.
I'll give some examples to get my point across below - yesterday (7/4/24) was a daylight savings day.
- Good
- Bad
- Normal day - everything back to normal
Here are my below attempts to rip out the undesired time correction attempt:
//Value(Text(DateValue(PickRDay_1.SelectedDate)+Time(TimePick_1.SelectedText.Value,0,0),"yymmddHHmm"))
//Text(DateAdd(PickRDay.SelectedDate,-TimeZoneOffset(PickRDay.SelectedDate),TimeUnit.Milliseconds),"yymmddHHmm")
//Text(DateAdd(PickRDay.SelectedDate+Time(TimePick.SelectedText.Value,0,0),TimeZoneOffset(),TimeUnit.Minutes),"yymmddHHmm")
//DateAdd(PickRDay.SelectedDate+Time(TimePick.SelectedText.Value,0,0),TimeZoneOffset(PickRDay.SelectedDate+Time(TimePick.SelectedText.Value,0,0)))
Value(Text(DateTimeValue(DateValue(PickRDay_1.SelectedDate)+Time(TimePick_1.SelectedText.Value,0,0)),"yymmddHHmm"))
(Side rant, please add an actual time picker and a datetime picker Microsoft - I've seen this asked for since 2017, if you've had time to add new versions of existing inputs, you've got time to add those)