Repository navigation
docs(adr): ADR-0022 schedule timezone (per task, default system local) (#166) - #168
Conversation
|
TL ACCEPT (docs) on tip Locks baked in: per-task Waiting Product GO + QA GO + CI before merge. No tag. |
…ion (#166) - Bottom line: after migration no task's fire time may change. - Absolute (RFC 3339) one-shot: timezone = system zone, display-only. - Naive one-shot: timezone = UTC, like recurring rows. - Tests: fire-time-unchanged checks; QA must verify one legacy one-shot.
|
ADR-0022 amended: legacy one-shot migration (TL lock + PO Product GO) (new tip This replaces the earlier amendment at Decision 3 (boot migration), locked
Decision 4 (after migration)
Tests / QA
Consequences and the GLOSSARY entry were updated to match. New commit on top, no force-push. Not merged; waiting for QA + CI. |
#166) TL lock implementing the PO bottom line (no fire time may change): - Recurring legacy rows -> UTC. - Legacy one-shot rows (naive and absolute) -> system local zone at migration (the zone chrono::Local reads naive values in today), not UTC and not the config override. Stamping UTC would delay naive one-shots by 8h on HKT hosts. - After migration parse_one_shot_target reads naive values in the row's own timezone, never a hard-coded chrono::Local. - Remove the "raise with TL/PO" note; update Consequences, Tests, QA and the glossary entry.
|
TL ACCEPT on tip Locked: legacy recurring → UTC; legacy naive one-shot → system Local (not UTC); absolute one-shot timezone display-only; post-migration |
Docs only. Adds ADR-0022 (Accepted) for #166: evaluate schedules in a per-task timezone instead of UTC. No code changes.
Refs #166
Summary of the decision
[general] timezone(IANA, viachrono-tz), else system local (TZ/ OS zone), elseUTC. Logged at boot with its source;warnwhen it ends up UTC (typical in Docker).GET /api/schedule/timezone) and each task's timezone.timezonecolumn (PO option C): new rows get the effective default; boot migration stamps existing recurring rowsUTCso their fire times do not change. Existing one-shot rows get the system-detected zone, which matches today'schrono::Localreading of naive datetimes. No automatic rewrite of cron fields; users change a task's timezone in the portal.timezoneonPOST/PUT /api/tasks(400 invalid_timezone), inGET /api/tasksitems, and as an optionalschedule_taskargument.summarize_cron,user_model_cron, heartbeat) use the effective default timezone.next_fire(expr, tz, after)on croner 4 withDateTime<Tz>, used for both the live job andnext_run_at. No hand-rolled offsets.FixedOffsetwhen the job is created (and parses with croner 3), so it cannot follow DST. Recurring jobs become self-rescheduling one-shots behind a stable handle.Times are in UTC for now./時間而家係 UTC。), replaceEvaluated in UTC.in theschedule_taskdescription, and show "now" in the default timezone in the system prompt.[general] timezoneand/orTZ.Rejected: (A) re-reading existing rows as local time, which can shift them 8h without warning; (B) rewriting cron fields once, which breaks on DOW/DOM/
L/ranges/steps/DST/half-hour offsets; a single global timezone; hand-rolled offsets;Job::new_async_tz.Also adds a Schedule timezone entry to
GLOSSARY.md.Does not block #155 (already merged in #167).