Skip to content

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

@mbsrosenberg

Description

@mbsrosenberg

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions