linuxfoundation / lfevents

For the Linux Foundation Events website events.linuxfoundation.org
MIT License
19 stars 5 forks source link

Countdown block should show EDT time and not the user's time #900

Closed cjyabraham closed 2 months ago

cjyabraham commented 2 months ago

Currently the countdown block shows the expiry time in the user's timezone but it should always show the time in the EDT timezone as it says "EDT" in the settings:

Screenshot 2024-05-11 at 5 20 04 PM

This works correctly for the expiry buttons so we could maybe copy over what's necessary from that code.

cjyabraham commented 2 months ago

Fixed with this note:

I've deployed the fix so that now the time entered is 12-hour format and always in ET timezone.

I've also gone through and re-set all the existing timers on all upcoming events so the data is stored correctly. Note that most of these were not set to expire at 9AM local time on the day of the conference but were set to expire at 10AM or 11AM. I've just matched what you had up there as there may be a reason for that difference.

There were a few other issues with the existing timers: the Open Source Days countdown was going to expire 3 weeks before the start of the conference. I've set it to the correct date. Open Compliance Summit had its expiry 12 hours too short so I think I've correctly set it to expire at 9AM Tokyo time now.

Note you'll see that inside the editor, the timer doesn't show. Instead it just says "Countdown Timer". I was having trouble getting it to render correctly in the editor with timezones taken into account so figured it'd just be easier to not show it. All else about the block should work the same. Let me know if this is going to be a problem for any reason.