occurrence_date is documented as a UTC key but is a local date in the request's zone #198
Labels
No labels
adr
android
area/calendar
area/design-system
area/i18n
area/jobs
area/offline
area/server
area/testing
bug
ci
duplicate
enhancement
help wanted
invalid
notifications
question
reliability
security
severity/low
severity/medium
tracking
web
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
eagraiclainne/app#198
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Event.occurrence_dateis described in the proto as "an opaque YYYY-MM-DD key, UTC" (proto/api/core/v1/event.proto:56-58).It is not UTC. The slot is
day.Format("2006-01-02")on a time already expressed in the request's location (internal/domain/event.go:419,430), and it is parsed back withParseInLocationagainst the same zone (validSlotininternal/services/event/occurrences.go). The key is the occurrence's local date in whichever zone the caller passed, which is exactly whySplitOccurrenceandCancelOccurrencemust be given the same zone as theListOccurrencescall that produced the row.The comment is the only thing wrong — the behaviour is correct and deliberate. Left as is it invites a client to compute a slot key in UTC and address a different day. Found while reviewing the calendar design handoff.
Fix the comment, and check no client-side comment repeats the claim.
Update — fixed in PR #203 (2026-08-25)
The proto comment now states the key is
a YYYY-MM-DD date in the zone the request carried, never UTC and never the row's own time_zone, and every request that carries a slot (SplitOccurrence,CancelOccurrence, and #209'sJoinOccurrence/LeaveOccurrence) notes the zone must match theListOccurrencescall that showed it. Closes when the PR merges.