timezone-seeding-day-of-week-bug
Installation
SKILL.md
Timezone Seeding Day-of-Week Bug
Problem
When seeding time-based database records with timezone conversion (e.g., availability blocks, schedules, recurring events), validation errors like "Start time must be before end time" occur even though the local times are correct. The root cause is that timezone conversion can change the day-of-week, making the end time appear to come before the start time when stored in UTC.
Context / Trigger Conditions
Symptoms:
- Database seeding fails with validation error: "Start time must be before end time"
- Validation error: "Effective from must be before effective until"
- Local times are correct (e.g., 9:00 AM - 5:00 PM) but fail when converted to UTC
- Issue occurs primarily with early morning times (midnight to ~6 AM)
- Error appears in timezones with negative UTC offsets (e.g., America/Los_Angeles UTC-8)