-
Notifications
You must be signed in to change notification settings - Fork 79
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
Blocks: Improve date display for schedule & sessions across timezones #696
Conversation
`wp.date.format` will respect the client's timezone, and show the date in the viewer's timezone. The current `dateI18n` approach always uses the site timezone, which can be confusing for regional and online events.
In some cases, if a session spans later than midnight and ends at the same time as an earlier timeslot, it can cause the sessions to overlap because the grid slot is already defined. Prepending the date fixes this, since separate days have separate grid systems.
This is mostly a workaround, instead of showing the user's time, but it's an improvement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall 👍🏻
I think the Schedule block should have the TZID too, though; otherwise I worry the ambiguity will confuse some folks.
- folks who are out of town could setup calendar reminders before they travel, and end up putting the incorrect times, and miss sessions.
- some contributors are used to the times being local, and will assume that they still are unless they see something to indicate otherwise
I think the TZID on all the blocks should also link to something like timeanddate.com, so people can easily convert between zones when needed.
Yeah, that makes sense. I've added it to the row heading, but I think putting it on the times in the session cells would be too verbose, so it looks like this now: As for linking to a 3rd party time conversion site, I think that might also get visually overwhelming - to have so many links in the schedule. If you feel strongly about it, can you open another issue for that so we can discuss it there? |
👍🏻
👍🏻 - #698 |
This PR iterates on how dates & times are displayed in the blocks.
format
, which will use the client's timezone to do all session-grouping, layout, and display. This ensures the schedule is always showing the viewers timezone, which makes more sense for online and regional WordCamps.grid-template-rows
fortime-0010
, but only the first was valid. The session spanned from that first start time to it's real start time, functionally the entire "day".Fixes #562, fixes #565, fixes #492.
Note: I'm not sure if we could consider this as fixing 565 - once this PR is applied, it should be the case that session times are always either your (viewer's) time, or has a timezone identifier.Now that the schedule time also has a TZ displayed, it should always be clear what timezone you're seeing.Screenshots
Schedule block use the viewer's timezone. My browser timezone is EDT, the site's timezone is PDT. The sessions start at 8:00 am PDT. On the left is Safari, which shows production, showing the ambiguous "8:00am" start time. On the right is Firefox showing my sandbox, correctly showing "11:00am". (it's still ambiguous, but most people will assume local time. Organizers can add a note above the schedule)
Session overlapping (#562):
Sessions with timezones
How to test the changes in this Pull Request: