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
Dynamic schedule timezones #704
Conversation
Remove timezone field from Conference model, since it is not used by a conference's schedule (the timezone is determined by the Django's project timezone - see the TIME_ZONE setting). Note that the "django-timezone-field" package is **not** removed from the requirements file in this commit because some current conference sites are using it for speaker timezone fields (see #576 and #596).
Convert "start" and "end" fields in Slots from TimeFields to DateTimeFields so that they can include timezone information.
- Add new `time_zone_context` context processor that replaces and extends `django.template.context_processors.tz`. It adds both the current time zone and a list of common time zones to the context. - Add middleware to set a user's time zone based on information stored in their session. - Add form and view to allow users to select a new time zone.
Use day of week based on presentation slot start datetime, not on presentation slot day.
Code Climate has analyzed commit 92044a4 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 90.6% (50% is the threshold). This pull request will bring the total coverage in the repository to 76.5% (0.0% change). View more on Code Climate. |
Just curious, does this use the browser timezone information to make an intelligent guess about the right timezone? I'm excited to see how it handles conference "days" that are now split over two days in a different timezone. |
For example, apparently the js code |
FYI: This isn't deployed on the JupyterCon site because I have found an issue with converting existing schedules that I am currently troubleshooting.
No, this uses the conference server's time zone as the default. Since the user-selected time zone is stored in the session, though, conference attendees should not have re-select their preferred time zone each time they visit the site.
This pull request does not explicitly deal with that. While choosing a different time zone will show you the local date and time that a presentation is happening on the schedule, it will not change the schedule day that the presentation is associated with. |
That sounds fine - the conference still has "days", but the time on the left in the schedule shows you the local time (including day)? |
Yes - see https://pydata.org/eindhoven2020/schedule/. |
Because this pull request makes significant changes to the database and the design of the schedule pages, it should not be applied to finished conferences.