From 37eba911912da94355e4f80c8580a00dcbe87aac Mon Sep 17 00:00:00 2001 From: Joshua Date: Sat, 26 Sep 2026 10:15:44 -0400 Subject: [PATCH] Docs: preview start_date defaults to the household-local today The occurrence-preview request docstring and the admin client's startDate comment still said the default is the API host's today. The route defaults to the household-local today in the configured timezone, and uses the host's local time only when that setting is empty. Co-Authored-By: Claude Opus 5.5 --- admin/src/api/definitions.ts | 5 ++++- api/routes_admin.py | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/admin/src/api/definitions.ts b/admin/src/api/definitions.ts index b38f83b..ce7a513 100644 --- a/admin/src/api/definitions.ts +++ b/admin/src/api/definitions.ts @@ -150,7 +150,10 @@ export async function updateDefinition( export const OCCURRENCES_PREVIEW_PATH = `${DEFINITIONS_PATH}/occurrences-preview`; export interface OccurrencesPreviewOptions { - /** "YYYY-MM-DD"; the API defaults to its host's today. */ + /** + * "YYYY-MM-DD"; the API defaults to the household-local today in the + * configured `timezone` (the API host's local time when that is empty). + */ startDate?: string; /** 1..50; the API defaults to 10. */ count?: number; diff --git a/api/routes_admin.py b/api/routes_admin.py index 7f0b7b4..c67a269 100644 --- a/api/routes_admin.py +++ b/api/routes_admin.py @@ -536,9 +536,10 @@ class AdminOccurrencesPreviewRequest(BaseModel): ``rule`` is the SAME object create/edit take. ``start_date`` is an optional strict ``YYYY-MM-DD`` (validated by the core; default the - API host's today). ``count`` is a strict JSON integer in - 1..``_PREVIEW_MAX_COUNT`` — anything else is 422 before any handler - code runs. + household-local today in the configured ``timezone``, empty falling + back to the API host's local time). ``count`` is a strict JSON + integer in 1..``_PREVIEW_MAX_COUNT`` — anything else is 422 before + any handler code runs. """ rule: AdminRuleRequest -- 2.55.0