You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Store::create_schedule binds input.scheduled_at as-is (store.rs INSERT), while updated_at/published_at are written with datetime('now'). The due-check query normalizes at READ time (#107 - that part works), but every other surface (list API, web UI columns, any new query that compares scheduled_at to datetime('now') raw) sees mixed formats with no timezone labels.
User-visible impact
Web UI shows a 13:00 slot next to a 05:13 created_at and they look 8h apart; one is +07:00, the other naive UTC. Owner read this as "jam penjadwalan vs jam tersimpan tidak sinkron".
Sorting by the scheduled_at string orders +07:00 rows by their local clock time, not by absolute instant.
The API accepts any well-formed ISO timestamp without validation (#pitfall seen Aug 29: a UTC value suffixed +07:00 was silently stored at the wrong slot). A Z value, +00:00, +07:00, and .000Z all coexist in prod today.
Proposed fixes
Canonical storage: normalize scheduled_at to UTC RFC 3339 (YYYY-MM-DDTHH:MM:SSZ) at INSERT/PATCH; one-time migration for existing rows. Optionally keep the client's original in scheduled_at_raw for display fidelity.
Validate: reject timestamps without an explicit offset (400), so the silent wrong-slot class of bugs dies.
UI: render all times in one timezone (browser-local or a workspace TZ setting) with the offset shown; never raw-mix stored strings.
Evidence (one real
schedulestable, 2026-09-23)scheduled_atvalues stored verbatim from client input, three different formats side by side:Bookkeeping columns on the same rows use a fourth format (naive UTC, no T, no zone):
Store::create_schedulebindsinput.scheduled_atas-is (store.rs INSERT), whileupdated_at/published_atare written withdatetime('now'). The due-check query normalizes at READ time (#107 - that part works), but every other surface (list API, web UI columns, any new query that comparesscheduled_attodatetime('now')raw) sees mixed formats with no timezone labels.User-visible impact
scheduled_atstring orders +07:00 rows by their local clock time, not by absolute instant.Zvalue,+00:00,+07:00, and.000Zall coexist in prod today.Proposed fixes
scheduled_atto UTC RFC 3339 (YYYY-MM-DDTHH:MM:SSZ) at INSERT/PATCH; one-time migration for existing rows. Optionally keep the client's original inscheduled_at_rawfor display fidelity.scheduled_atagainstdatetime('now')outside the bug: Scheduler never publishes due schedules — timezone mismatch in get_due_schedules query #107-normalized query (e.g. any new bundle/retry queries copying the old pattern would silently regress).