Schedule's time is not converted correctly in dashboard
Closed this issue · 0 comments
MelissaAutumn commented
The schedule's start and end time are not converted correctly from UTC. Due to the wonders of daylight savings we calculate the utc offset of those times based on the schedule's last update time.
So if someone saves their schedule with a time of 9-5 in PDT (-7) it currently turns it into 8-4 in PST (-8). Instead we should use the date of time_updated
to calculate the UTC offset to apply to the time range. Then the time range will always be 9-5 (in this example.)
Here's an example of how it's done:
https://github.com/thunderbird/appointment/blob/main/backend/src/appointment/database/models.py#L305