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

Schedule view is not timezone-aware #239

Open
Kunsi opened this issue May 31, 2024 · 3 comments
Open

Schedule view is not timezone-aware #239

Kunsi opened this issue May 31, 2024 · 3 comments

Comments

@Kunsi
Copy link
Contributor

Kunsi commented May 31, 2024

Screenshot 2024-05-31 at 15-20-28 Live-Streams – Electromagnetic Field 2024 Streaming

This conference is in UTC+01:00 (Europe/London), but the streaming website does always show dates in Europe/Berlin (UTC+02:00 currently). This leads to confusion by visitors, because the site states "talk running since (time in 30 minutes)".

The shown talk title is correct however, so this is just a display issue, the detection of the running talk is not affected.

I presume this also happens on the schedule view under the video player, which is correct by accident if the browser timezone matches the conference timezone. The schedule view should always show the conference timezone, no matter which timezone the browser is in.

@saerdnaer
Copy link
Member

previous installments of this event series used following hack:

https://github.com/voc/streaming-website/blob/master/configs/archive/emf2018/config.php#L3-L4

$prev_tz = date_default_timezone_get();
date_default_timezone_set('Europe/London');

Should we extend the conferenceJSON class to do something similar based on the time_zone_name config option?

"time_zone_name": {
"title": "Zeitzone",
"type": "string",
"examples": ["Europe/Amsterdam", "Europe/Berlin"],
"default": "Europe/Amsterdam",
"pattern": "^([A-Z][a-z+]/[A-Z][a-z+]|UTC)$"
},

@Kunsi
Copy link
Contributor Author

Kunsi commented Jun 27, 2024

Yeah, that would be ideal.

@iSchluff
Copy link
Member

iSchluff commented Jul 2, 2024

Should we extend the conferenceJSON class to do something similar based on the time_zone_name config option?

"time_zone_name": {
"title": "Zeitzone",
"type": "string",
"examples": ["Europe/Amsterdam", "Europe/Berlin"],
"default": "Europe/Amsterdam",
"pattern": "^([A-Z][a-z+]/[A-Z][a-z+]|UTC)$"
},

Probably a good idea, although I would recommend sticking with camelCase like in other properties.

I presume this also happens on the schedule view under the video player, which is correct by accident if the browser timezone matches the conference timezone. The schedule view should always show the conference timezone, no matter which timezone the browser is in.

I have previously added some code to the schedule to correctly show the current time in the timezone of the event

'offset' => $from->getOffset(),

const eventOffset = parseFloat($block.data('offset')) || 0;
const eventTime = formatLocalTime(now, eventOffset);
$now.find('.overlay').css('width', px);
$now.find('.label').text("now (" + eventTime + ")");
$time.text(eventTime + " (" + formatOffset(eventOffset) + ")");

Although I am open to suggestions on how to better show this. I would have liked to display the name of the event timezone, but that wasn't possible previously because the name is not in the schedule.
With the config suggested by @saerdnaer this would be possible

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

No branches or pull requests

3 participants