Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timezones should be respected on the "Classes" page #54

Closed
3 tasks
alexdlaird opened this issue Jan 25, 2018 · 1 comment
Closed
3 tasks

Timezones should be respected on the "Classes" page #54

alexdlaird opened this issue Jan 25, 2018 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@alexdlaird
Copy link
Member

alexdlaird commented Jan 25, 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.

  • 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)
@alexdlaird alexdlaird added enhancement New feature or request help wanted Extra attention is needed labels Jan 25, 2018
@alexdlaird alexdlaird added this to the 1.1.0 milestone Jan 25, 2018
@alexdlaird alexdlaird self-assigned this Jan 25, 2018
@alexdlaird alexdlaird added bug Something isn't working and removed enhancement New feature or request help wanted Extra attention is needed labels Feb 1, 2018
@alexdlaird 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
@alexdlaird alexdlaird added wontfix This will not be worked on and removed bug Something isn't working labels Feb 2, 2018
@alexdlaird alexdlaird added enhancement New feature or request bug Something isn't working and removed wontfix This will not be worked on enhancement New feature or request labels Feb 3, 2018
@alexdlaird alexdlaird reopened this Feb 3, 2018
@alexdlaird alexdlaird modified the milestones: 1.x, 1.0.2, 1.0.1, 1.1.0 Feb 3, 2018
@alexdlaird alexdlaird added enhancement New feature or request and removed bug Something isn't working labels Feb 5, 2018
@alexdlaird alexdlaird removed this from the 1.x milestone Feb 10, 2018
@alexdlaird
Copy link
Member Author

Closing, as the Helium project is not currently active.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant