I have a fairly simple flow setup to run against a shared mailbox that looks to see if a message was received outside of office hours, and if it does, then it gives the sender an option to alert the after hours team, or wait until business hours for a response. I have it setup to activate if the email was received before 8am, after 5pm, on Saturday or Sunday. For some reason, it will activate until 9am, and I can't see why.
Here is how I have it setup to grab the local time (EST) and a condition to to check if that time is before 8am:
This only seem to evaluate as true until 9am. I have also tried having the condition test against "Less than 08:00:00", but had the same result as using "Less than or equal to 07:59:59". For reference, the bottom 2 conditions are checking the day of week and the flow shows this same message had an output of "1".
Just to add my thoughts into the mix as well, it may be because you're just trying to compare against the time which I've had mixed success with. I tend to compare against the entire date time string to be sure.
The difference for me is that I've used the Convert Time Zone action which gives me more visibility of what is going on, but then when it comes to the condition, I build the date section of my comparison each time using this expression:
formatDateTime(utcNow(),'yyyy-MM-ddT17:00:00)
I would then just change the static part of the time to the times that I want e.g. 08:00:00 for 8AM or 17:00:00 for 5PM
I don't think so, because it works on the 5PM side of things, plus the time that it is checking against is evaluating correctly.
If I understand you correctly, your calculations are one hour off. Could this be an issue with Eastern Standard Time vs Daylight Savings Time?
Tomac
986
Moderator
stampcoin
699
Super User 2025 Season 2
Riyaz_riz11
577
Super User 2025 Season 2