Note: I've tagged this question with 'Apex' because there doesn't seem to be any other way to resolve it. I'm able to call on an Apex Action in a flow, but I need help with the code.
My org's timezone is GMT+10 or GMT+11, depending on whether or not daylight savings is in effect.
I have a flow which takes a date (StartDate) and converts it to a date/time value. I need the date/time value to be 9:30am on the same day as the date value.
As you know, Salesforce stores dates in GMT. So if the date value is 1/10/2019, the DATETIMEVALUE(StartDate) resolves to 1/10/2019 10am.
Which means DATETIMEVALUE(StartDate) - 0.5/24 resolves to 1/10/2019 9:30am - which is the date and time that I need.
The problem is, due to daylight savings, if the date is 1/11/2019, the same formula results to 1/11/2019 10:30am.
How can I ensure that the date/time value derived from the date field (StartDate) is always the same date at 9:30am?
I'm starting to think this can only be achieved via Apex. This should be okay as I'm able to call on an Apex Action from a flow.
Things I've Tried
Using this formula: DATETIMEVALUE(TEXT(YEAR(StartDate)) & "-" & TEXT(MONTH(StartDate)) & "-" & TEXT(DAY(StartDate)) & " 09:30:00")
Using this formula with Today()
Using this formula with StartDate
Any help would be much appreciated.