Architect Expression: DateTimeDiff returning unexpected negative values for same-day calls

Running into a weird edge case with date math in Architect. Trying to filter out calls that happened before a specific cutoff time today.

Here’s the expression I’m using:

IF(DateTimeDiff(CALL.STARTTIMESTAMP, "2024-05-20T14:00:00Z", "HOURS") < 0, "Before Cutoff", "After Cutoff")

Logic seems sound. If the call started before 2 PM UTC, the diff should be negative. But for calls that started at 1:55 PM UTC, it’s returning “After Cutoff”. Checked the raw timestamps. CALL.STARTTIMESTAMP is definitely earlier.

Tried swapping to GetDayOfWeek just to isolate the date part, but that’s not relevant for the hour diff. Maybe DateTimeDiff handles fractional hours differently? Or is there a timezone shift happening internally that I’m missing? We’re on US/Central. The literal string is in UTC.

Environment:

  • Genesys Cloud Platform (US1)
  • Architect version: latest (as of May 2024)
  • Flow type: IVR
  • Expression type: Decision Node

Steps tried:

  • Verified CALL.STARTTIMESTAMP format via trace logs. It’s ISO 8601.
  • Changed the literal string to match Central Time. No change.
  • Used DateAdd to normalize both sides to midnight. Still getting weird results for times within the same hour.
  • Checked the Developer Guide. Docs say DateTimeDiff returns a number. Doesn’t specify rounding behavior.

Anyone else see this? Or am I missing a syntax nuance? The docs are light on examples for sub-day diffs.

Just need a reliable way to check if a timestamp is before a fixed time today. Don’t want to write a custom webhook for this. Feels like overkill.

Thanks.