Bug Fix
🕐 Scheduler timezone fix — critical time handling bug
Problem: The scheduler edit form displayed UTC time instead of local time in the datetime-local input field. This caused:
- Wrong time displayed — a task scheduled for 18:30 local showed as 17:30 in the edit form
- Time drift on re-save — every time you opened and saved a task, it shifted backwards by your UTC offset (e.g. -1 hour for CET)
- Kanban/Scheduler mismatch — Kanban correctly showed local time, but the scheduler form showed UTC, confusing users
- Tasks not firing when expected — because the displayed time didn't match the actual scheduled time
Root cause: toISOString().slice(0,16) returns UTC time, but <input type="datetime-local"> interprets its value as local time.
Fix: Replaced with toLocalDatetimeStr() helper that uses getHours()/getMinutes() to correctly format local time for the input element. Zero drift on re-save, consistent display across all views.
🤖 Generated with Claude Code