Explore shows event times in your timezone, not the event's #64
Labels
No labels
bug
chore
data
feature
frontend
good first issue
intermediate
needs/docs
needs/research
needs/upstream
type/bug
type/external
type/feature
type/refactor
urgency
high
urgency
immediate
urgency
low
urgency
medium
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ScottyLabs/cal#64
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What's wrong
Explore cards, the event popover and the mobile event modal format times in the browser's timezone. Qatar campus (Doha) sections show times such as "12:00 - 1:15 AM" for a viewer in Pittsburgh, which is not when the class meets.
How to reproduce
Expected
Times show in the event's own timezone (
event_timezone), with a short zone label when it differs from the viewer's, for example "8:00 - 9:15 AM GMT+3".Where to look
web/src/app/components/SearchResultSidebar.tsx: the card callsformatTimeRange(event.start_datetime, event.end_datetime);/events/already returnsevent_timezone.web/src/app/utils/dateService.ts:formatTimeRangeandformatDate. Add an optionaltimeZoneargument and pass it to everyIntl.DateTimeFormat. The same-day check (toDateString()) andsameMeridiem(getHours()) are browser-local too and must use the target zone.web/src/app/components/EventPopover.tsxandModalEvent.tsxcall the same helper.Done when
formatTimeRangewith atimeZone.