Skip to content

docs: add Timezones section to README - #2

Merged
prineycom merged 1 commit into
mainfrom
docs/timezone-section
Sep 12, 2026
Merged

prineycom merged 1 commit into
mainfrom
docs/timezone-section

Conversation

@prineycom

@prineycom prineycom commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Closes #1

What

Adds a Timezones section to the README (between "Utility" and "Write safety") covering:

  • How wall-clock times are interpreted: --at, --remind offsets, deadline times and short-syntax times (@friday 15:00) are parsed in the process's local timezone (TZ env var) via naive strptime().timestamp() — not UTC, not the SP client's timezone. A host/client timezone mismatch shifts every scheduled task and reminder.
  • Detection: timedatectl / cat /etc/timezone — headless hosts are very often UTC.
  • Per-invocation fix (CLI): TZ=Europe/Belgrade ./sp schedule ...
  • MCP server fix: MCP clients filter the subprocess environment (Hermes passes only PATH/HOME/LANG etc., no TZ) — set env: TZ: in the client's server config; requires an agent restart since MCP servers spawn at startup.
  • Related gotchas: sp schedule without --remind silently clears remindAt (re-arm with --remind 0m — bites during TZ-fix reschedules); display commands render timestamps in the process timezone (a correct file looks wrong on a UTC host); repeat startTime is interpreted by the app, unaffected by host TZ.

Verification

Written from a real incident: headless host in Etc/UTC, SP clients in Europe/Belgrade — tasks scheduled as "20:00" showed up as 22:00 in the app. Fixes were verified live: per-invocation TZ= reschedule produced correct dueWithTime unix-ms values (checked in the raw sync file), and the MCP env.TZ fix was confirmed by creating a test task through the MCP tool and checking its timestamp (UTC 13:00 = BGD 15:00, as intended).

All wall-clock times (--at, --remind, deadlines, short-syntax times) are
parsed in the process's local timezone via naive strptime().timestamp().
Document how to detect a host/SP-client timezone mismatch, the per-invocation
TZ= fix for the CLI, and the env-based fix for the sp-mcp server (MCP clients
filter TZ out of the subprocess environment). Includes related gotchas:
schedule without --remind clears remindAt, display commands render in the
process timezone, repeat configs are unaffected (interpreted by the app).

Closes #1
@prineycom
prineycom merged commit f302a2c into main Sep 12, 2026
3 checks passed
@prineycom
prineycom deleted the docs/timezone-section branch September 12, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: add a Timezone section explaining how wall-clock times are interpreted

1 participant