feat(cli): read the default time zone of gram plan from the timezone setting #83

Merged
abiwab merged 1 commit from feat/cli-timezone-setting into main 2026-10-04 18:00:16 +02:00
Owner

A `timezone` setting (`.gram/config.yaml`, or the global config) gives `gram plan` its default time zone, so a project that always cooks in one place stops repeating `--tz`.

  • Order: `--tz`, then `timezone` of the project or global config, then this machine's zone.
  • Only `gram plan` reads it, and only complains when it is not a zone. The schema accepts any string, so a typo never stops `gram view` or `gram build`. A bad setting says where it comes from and how to fix it (`gram config set timezone `); `--tz` still rescues a bad one, and the setting is not even looked at when `--tz` is given.
  • Tests: the unit order and the messages, and the real CLI end to end in a project directory (the serving time is read in the configured zone, `--tz` wins, a bad value fails `gram plan` only, `view` and `build` still work).
  • Docs EN + FR: the `config.yaml` reference, `--tz`, the plan-a-meal guide and the planning page. Changeset extended (the `gram plan` one).

Stacked on #82 (docs/scheduler): it edits pages that only exist there. The base is `docs/scheduler`; once #82 is merged, retarget this PR to `main`.

A \`timezone\` setting (\`.gram/config.yaml\`, or the global config) gives \`gram plan\` its default time zone, so a project that always cooks in one place stops repeating \`--tz\`. - **Order**: \`--tz\`, then \`timezone\` of the project or global config, then this machine's zone. - **Only \`gram plan\` reads it, and only complains when it is not a zone.** The schema accepts any string, so a typo never stops \`gram view\` or \`gram build\`. A bad setting says where it comes from and how to fix it (\`gram config set timezone <zone>\`); \`--tz\` still rescues a bad one, and the setting is not even looked at when \`--tz\` is given. - Tests: the unit order and the messages, and the real CLI end to end in a project directory (the serving time is read in the configured zone, \`--tz\` wins, a bad value fails \`gram plan\` only, \`view\` and \`build\` still work). - Docs EN + FR: the \`config.yaml\` reference, \`--tz\`, the plan-a-meal guide and the planning page. Changeset extended (the \`gram plan\` one). **Stacked on #82** (docs/scheduler): it edits pages that only exist there. The base is \`docs/scheduler\`; once #82 is merged, retarget this PR to \`main\`.
feat(cli): read the default time zone of gram plan from the timezone setting
All checks were successful
CI / Build, Test & Publish (pull_request) Successful in 3m10s
da345192c7
abiwab changed target branch from docs/scheduler to main 2026-10-04 17:59:19 +02:00
abiwab merged commit b7de8666ee into main 2026-10-04 18:00:16 +02:00
abiwab deleted branch feat/cli-timezone-setting 2026-10-04 18:00:16 +02:00
Sign in to join this conversation.
No description provided.