feat(users): timezone column + PUT /api/me/timezone

Schema + endpoint scaffolding for #392 Half B (per-user timezone
scheduling). Adds two columns to the users table:

  - timezone text NOT NULL DEFAULT 'UTC' (IANA name)
  - timezone_updated_at timestamptz (nullable; populated on each PUT)

PUT /api/me/timezone validates the IANA value via time.LoadLocation
and writes the row. No scheduler integration yet — the scheduler
struct lands in the next commit and the handler-side Refresh call
in the commit after.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-13 11:54:45 -04:00
parent 5cd342d521
commit 230da7bdcb
8 changed files with 286 additions and 11 deletions
+2
View File
@@ -522,6 +522,8 @@ type User struct {
DisplayName *string
AutoApproveRequests bool
Email *string
Timezone string
TimezoneUpdatedAt pgtype.Timestamptz
}
type UserInvite struct {