You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Class times are stored without any timezone data on the backend, but their storage is actually in the relative timezone of the associated user. The current UI fixes this, but it could be considered bad practice and would be inconsistent for others using the API.
This will take a few steps to fix. Given it's scope (not large, but small/medium) it may make sense to do this after (or at the same time) CourseSchedule is split out into it's own model.
Times should not actually be stored with timezone information, rather times should be documented to be in UTC. Alternatively, class times could simply be updated in the database when a user makes changes to their own timezone—this seems like a less ideal approach, though there are tradeoffs in either case.
As timezones are specific to days (for instance, DST), the timezone should be set based on the first day of the associated CourseGroup.
Add migration to convert existing database items for Course model (start and end date/times) as the user's current timezone, then convert to UTC and persist back to the database
Add backend support for creating, updating, and retrieving courses with proper time zone reflected (specific to the serializer, which converts naive times to UTC before storing)
Frontend changes (convert times received from backend to the user's timezone)
The text was updated successfully, but these errors were encountered:
alexdlaird
changed the title
Timezones are respected on the "Calendar" page but not on the "Classes" page
Timezones should be respected on the "Classes" page
Feb 1, 2018
Class times are stored without any timezone data on the backend, but their storage is actually in the relative timezone of the associated user. The current UI fixes this, but it could be considered bad practice and would be inconsistent for others using the API.
This will take a few steps to fix. Given it's scope (not large, but small/medium) it may make sense to do this after (or at the same time) CourseSchedule is split out into it's own model.
Times should not actually be stored with timezone information, rather times should be documented to be in UTC. Alternatively, class times could simply be updated in the database when a user makes changes to their own timezone—this seems like a less ideal approach, though there are tradeoffs in either case.
As timezones are specific to days (for instance, DST), the timezone should be set based on the first day of the associated CourseGroup.
The text was updated successfully, but these errors were encountered: