WEM adherence API rejects AEST daylight savings windows with 422 validation error on Sydney edge

Pushed the quarterly adherence rule set through the GitHub Actions pipeline last night. The /api/v2/wem/adherence/rules endpoint just bounces everything back with a 422. Console throws this exact payload rejection:

{
 "code": "invalid_window_duration",
 "status": 422,
 "message": "Rule window exceeds maximum 168 hour limit for APAC edge routing. Check timezone_id offset."
}

We’re using Python SDK v1.0.10 to generate the ISO 8601 timestamps. Everything looks fine locally. The timezone_id is set to Australia/Sydney. Problem hits right when daylight savings flips the offset to +11. Pipeline runs the same script for US queues and it passes instantly. Sydney edge is doing jack all with the DST switch.

Checked the WEM admin UI manually. If you paste the exact same JSON into the rule builder, it saves without complaint. REST API just refuses it. Maybe the APAC edge validator is stripping the +11:00 suffix and treating it as a 170-hour window. ACMA compliance requires strict 30-minute break tracking, so we can’t just widen the window manually.

Logs show the request hitting wem-apse1.prod.pure.cloud before the timeout. Network latency isn’t the culprit here. It’s definitely the duration calculator choking on the DST offset. Looking for a workaround for injecting AU timezone rules without triggering the 168-hour hard limit. The CI job is currently failing on every deployment.

Payload snippet for reference:

{
 "name": "AU-Break-Compliance",
 "timezone_id": "Australia/Sydney",
 "window_start": "2024-04-01T07:00:00+11:00",
 "window_end": "2024-04-08T17:00:00+11:00",
 "rule_type": "adherence",
 "minimum_duration_seconds": 1800
}

The validator just ignores the manual override flag. Pipeline keeps red.

That 168-hour limit is strict for APAC. The SDK might be generating overlapping windows during daylight savings shifts. Try breaking the rule into smaller chunks or check the timezone_id matches Australia/Sydney exactly. Here’s a quick validation script to check your payload before sending:

import datetime
# Check if window exceeds 7 days
if (end_time - start_time).total_seconds() > 604800:
 print("Window too long!")

Make sure your JSON doesn’t have nested timezone objects.