The daily digest notification count was inconsistent with the kanban UI because the server used UTC time while the client used local time. A task due Dec 24 would appear overdue on the server (UTC Dec 25) but still show as "due today" for the user (local Dec 24). Changes: - Add timezone column to notification_preference table - Auto-capture user's timezone from X-Timezone header when fetching tasks - Use stored timezone in HandleDailyDigest for accurate overdue calculation The mobile app already sends X-Timezone on every request, so no client changes are needed. The timezone is captured on each app launch when the tasks API is called. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
8 lines
405 B
SQL
8 lines
405 B
SQL
-- Add timezone column to notification preferences
|
|
-- Stores IANA timezone name (e.g., "America/Los_Angeles") for background job calculations
|
|
ALTER TABLE notifications_notificationpreference
|
|
ADD COLUMN timezone VARCHAR(50);
|
|
|
|
-- Add comment for documentation
|
|
COMMENT ON COLUMN notifications_notificationpreference.timezone IS 'IANA timezone name for daily digest calculations (e.g., America/Los_Angeles)';
|