Auto-schedule ignores user timezone (schedules in UTC) #116

Open
opened 2026-02-28 01:28:40 -05:00 by deekerman · 0 comments
Owner

Originally created by @mbsrosenberg on GitHub (Feb 4, 2026).

Bug

TimeSlotManager reads timezone from client-side Zustand store, which returns undefined on the server and defaults to UTC.

Impact

Work hours set to 12:00-20:00 in Asia/Bangkok get scheduled as 12:00-20:00 UTC (actually 7pm-3am local time).

Location

src/services/scheduling/TimeSlotManager.ts line ~50:

this.timeZone = useSettingsStore.getState().user.timeZone; // undefined on server 

Fix

Pass timezone from UserSettings DB record through TaskSchedulingService  SchedulingService  TimeSlotManager constructor instead of reading from client store.

Happy to open a PR if helpful.
Originally created by @mbsrosenberg on GitHub (Feb 4, 2026). ## Bug TimeSlotManager reads timezone from client-side Zustand store, which returns undefined on the server and defaults to UTC. ## Impact Work hours set to 12:00-20:00 in Asia/Bangkok get scheduled as 12:00-20:00 UTC (actually 7pm-3am local time). ## Location `src/services/scheduling/TimeSlotManager.ts` line ~50: ```ts this.timeZone = useSettingsStore.getState().user.timeZone; // undefined on server Fix Pass timezone from UserSettings DB record through TaskSchedulingService → SchedulingService → TimeSlotManager constructor instead of reading from client store. Happy to open a PR if helpful.
Sign in to join this conversation.
No labels
enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fluid-calendar#116
No description provided.