I have a child flow that I created in which I need to send an email to the manager of a new employee 5 days before the Start Date at 9AM Arizona time. Important note: my client is in AZ and I'm on Eastern Time. No issues with the Parent/Child Flow in my Solution. The issue is converting the Start Date from UTC to Arizona Time in the child flow. Every time the flow runs, the time the email is sent is off by 5 hours. Latest test I ran was yesterday. Start Date is 2/16/23. The Flow ran pending the "Delay until" which is set to 9AM. The email came through at 4AM. I've tried multiple ways to do this, but here's current config. Child flow - Manually Trigger Flow with several inputs from parent flow, including the Start Date.
Then I have a Convert time zone action named "Convert StartDate to MDT":
Base time: Outputs (from Compose StartDate)
Format string (Expression): formatDateTime(addDays(outputs('Compose_StartDate'),-2, 'yyyy-MM-dd')). Note: I'm using -2 instead of -5 in here for testing purposes
Source time zone: (UTC-11:00) Coordinated Universal Time-11
Destination time zone: (UTC-07:00) Arizona
Then I have a "Delay until" action with timestamp using expression: formatDateTime(body('Convert_StartDate_to_MDT'), 'yyyy-MM-ddT09:00:00Z')
Last action is "Send an Email".
Note: I also have the "Respond to a PowerApp or Flow" action in between. I could move, if necessary, but for now, the order doesn't seem to be an issue. And I realize the Flow may be running 2 hours ahead being I'm on Eastern Time vs AZ time so maybe an adjustment needs to be made considering that, but the Convert Time zone action still doesn't seem to be working correctly.
------------------------------
Beth Beck
O365 Business Analyst
Fort Myers FL
------------------------------