ElixirTeSS / TeSS

Training e-Support Service using Ruby on Rails.
Other
12 stars 12 forks source link

Viewer's time zone? #922

Open cwant opened 6 months ago

cwant commented 6 months ago

Hi all, sorry if this is the wrong place to ask this.

I was wondering if TeSS supported handling the viewer's (browser) time zone when rendering events?

For example, with this Canadian training calendar, there is some JS that detects the viewer's timezone, then feeds that to the Google calendar:

https://alliancecan.ca/en/services/advanced-research-computing/technical-support/training-calendar

(This works because the Google calendar supports time zones in it's query string, e.g. ctz=America/Edmonton, and the JS gets this time zone value from the browser.)

Thanks, and please let me know if there's a more appropriate place to ask such questions.

fbacall commented 6 months ago

This is the right place!

We don't currently support this, but it would be quite straightforward to add.

There are a couple of issues that came to mind however:

I think we could just display the time in both the original and the current user's timezones at the same time, or have a button to switch between them.

cwant commented 6 months ago

Thanks for your comments @fbacall ! Definitely some things to consider. In our case Canada is pretty wide, so most of our events are online (at least the ones we advertise online), which is why the viewer's timezone is often the best choice for displaying events. I'll poke around a bit here, and if I find a solution that is PR worthy, I'll post something.

Regards, Chris