fix(calendar): send dispatch from/to as Z-suffixed UTC, not +00:00 #69

Merged
vas2000-work merged 1 commit from fix/dispatch-board-timestamp-z-suffix into main 2026-06-05 20:49:57 +02:00
Owner

Problem

The dispatch board (/dispatch) was stuck on "Could not load the dispatch board." Auth, the RequireCalendar gate, and the calendar list view all work, which isolated the failure to the GET /api/v1/dispatch request itself.

Root cause

The client built the request as /dispatch?from={}&to={} using to_rfc3339(), which emits a +00:00 UTC offset. A literal + in a query string URL-decodes to a space on the server, so the decoded value 2026-06-05T04:00:00 00:00 fails chronos DateTime` parser and the handler returns 400. The identical bug was fixed for the calendar list call in the Z-suffix change (#65), but the dispatch board call was missed.

Fix

Format both from and to with to_rfc3339_opts(SecondsFormat::Secs, true) so they serialize as 2026-06-05T04:00:00Z, matching the working calendar list request. SecondsFormat is already imported.

Verification

Not built locally (Rust runs only in the dev container). Needs a client rebuild + redeploy to confirm the board loads against staging. Change is a 1:1 match to the calendar list call.

## Problem The dispatch board (`/dispatch`) was stuck on "Could not load the dispatch board." Auth, the `RequireCalendar` gate, and the calendar list view all work, which isolated the failure to the `GET /api/v1/dispatch` request itself. ## Root cause The client built the request as `/dispatch?from={}&to={}` using `to_rfc3339()`, which emits a `+00:00` UTC offset. A literal `+` in a query string URL-decodes to a space on the server, so the decoded value `2026-06-05T04:00:00 00:00` fails chrono`s `DateTime<Utc>` parser and the handler returns 400. The identical bug was fixed for the calendar list call in the Z-suffix change (#65), but the dispatch board call was missed. ## Fix Format both `from` and `to` with `to_rfc3339_opts(SecondsFormat::Secs, true)` so they serialize as `2026-06-05T04:00:00Z`, matching the working calendar list request. `SecondsFormat` is already imported. ## Verification Not built locally (Rust runs only in the dev container). Needs a client rebuild + redeploy to confirm the board loads against staging. Change is a 1:1 match to the calendar list call.
fix(calendar): send dispatch from/to as Z-suffixed UTC, not +00:00
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / clippy + fmt + tests (pull_request) Successful in 44s
8a5083ebaa
The dispatch board's GET /api/v1/dispatch call formatted its `from` and `to` query params with `to_rfc3339()`, which emits a `+00:00` offset. A literal `+` in a query string URL-decodes to a space on the server, so chrono's `DateTime<Utc>` parser rejects the value after decoding and the request 400s, leaving the board stuck on "Could not load the dispatch board." The same bug class was fixed for the calendar list call in the Z-suffix change (#65) but the dispatch call was missed. Switch both params to `to_rfc3339_opts(SecondsFormat::Secs, true)` so they serialize as `2026-06-05T04:00:00Z`, matching the working calendar list request.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
vas2000-work deleted branch fix/dispatch-board-timestamp-z-suffix 2026-06-05 20:49:57 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
psa-systems/mokosh-apps!69
No description provided.