Architect Expression: DateTimeDiff vs GetDayOfWeek for date comparison logic

We’re trying to build a distributed tracing pipeline where specific spans are tagged based on whether a call happened on a weekday or weekend. The goal is to inject this context into the Data Action payload before it hits our OpenTelemetry collector.

I’ve been wrestling with the expression syntax in Architect. Specifically, I want to avoid complex DateTimeDiff calculations if possible. My understanding is that GetDayOfWeek returns an integer (0-6).

Here is the expression I’m testing in the Data Action:

IF(GetDayOfWeek(CreatedTimestamp) > 5, "Weekend", "Weekday")

The issue is that GetDayOfWeek seems to behave unpredictably with timezones. Our servers are in Asia/Manila but the Genesys Cloud instance is set to America/New_York. When I test this with a timestamp that was clearly a Saturday in Manila, the expression evaluates to "Weekday".

Is GetDayOfWeek using the division’s local time or UTC? I can’t find explicit documentation on the timezone context for this function. If it’s UTC, I need to offset the CreatedTimestamp before passing it in, but DateTimeDiff only takes two timestamps, not a timezone string.

Also, trying to use DateTimeDiff to calculate the day of the week by comparing against a known Monday timestamp feels hacky and error-prone for leap years.

DateTimeDiff(CreatedTimestamp, KnownMonday, "d")

Anyone have a clean expression pattern for this? Or should I just handle the timezone normalization in the Python SDK before sending the data to the Data Action?