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.
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.tsline ~50: