DateTimeDiff vs GetDayOfWeek for date comparison in Architect

How exactly should I structure the logic when I need to filter contacts based on the day of the week inside an Architect flow? I’ve been wrestling with the expression syntax for a bit now, and the documentation feels a bit sparse on the nuances between using DateTimeDiff versus GetDayOfWeek.

I’m building a custom agent desktop integration that needs to trigger a specific screen pop only if the contact arrived on a Monday. My current approach is using a Data Action to fetch the contact’s createdTimestamp, then piping that into an expression node. I tried something like this:

GetDayOfWeek(FormatDate(GetContactField("createdTimestamp"), "yyyy-MM-dd")) == 1

But it keeps evaluating to false even when I know the timestamp is a Monday. I checked the Genesys Cloud wiki, and it says GetDayOfWeek returns an integer where 1 is Sunday and 7 is Saturday. Wait, is that right? Because in standard ISO-8601, Monday is 1. I’m getting confused by the offset.

Then I looked at DateTimeDiff. Could I just calculate the difference between the createdTimestamp and a known Monday reference date, then check if the modulo of the days is zero? Something like:

Mod(DateTimeDiff(FormatDate(GetContactField("createdTimestamp"), "yyyy-MM-dd HH:mm:ss"), "2023-01-02 00:00:00", "days"), 7) == 0

That feels clunky. Plus, timezone handling seems like a nightmare with DateTimeDiff if the agent is in London (GMT) but the contact data is stored in PST. The SDK handles the JWT and timezone offsets automatically for the desktop app, but Architect expressions seem to strip that context.

Is there a cleaner way to do this? Or am I missing a specific format string that makes GetDayOfWeek behave like ISO-8601? I don’t want to spin up a custom API endpoint just to return the day of the week for every contact. That seems like overkill.

Also, does GetDayOfWeek respect the timezone of the queue or the user? The docs mention “system time” but don’t specify if that’s UTC or the tenant’s configured timezone. If it’s UTC, I need to adjust the timestamp before passing it to the function, right? Because right now, a Monday morning in London is still Sunday night in California, and my logic is breaking for US-bound campaigns.