Skip to content

Commit c6d7a17

Browse files
committed
Add a bit about time zone
1 parent 9582464 commit c6d7a17

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

src/app/conf/2025/schedule/_components/schedule-list.tsx

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client"
22

3-
import { format, parseISO, compareAsc } from "date-fns"
3+
import { parseISO, compareAsc } from "date-fns"
44
import { ReactElement, useMemo, useState } from "react"
55

66
import { ScheduleSession } from "@/app/conf/_api/sched-types"
@@ -101,6 +101,10 @@ function getSessionsByDay(
101101
}
102102
}
103103

104+
/**
105+
* September 8 in Amsterdam is Central European Summer Time
106+
*/
107+
const CONFERENCE_TIMEZONE = "CEST"
104108
const timeFormat = new Intl.DateTimeFormat(undefined, {
105109
hour: "2-digit",
106110
minute: "2-digit",
@@ -197,12 +201,21 @@ export function ScheduleList({
197201
key={date}
198202
className="typography-body-sm bg-neu-200 pb-px dark:bg-neu-50"
199203
>
200-
<h3
201-
className="bg-neu-50 py-4 dark:bg-neu-0"
202-
id={`day-${index + 1}`}
203-
>
204-
{format(parseISO(date), "EEEE, MMMM d")}
205-
</h3>
204+
<div className="flex items-center justify-between bg-neu-50 py-4 dark:bg-neu-0">
205+
<h3 id={`day-${index + 1}`}>
206+
{parseISO(date).toLocaleDateString("en-US", {
207+
weekday: "long",
208+
month: "long",
209+
day: "numeric",
210+
})}
211+
</h3>
212+
<span
213+
className="text-neu-800"
214+
title="All times are displayed in Central European Summer Time"
215+
>
216+
All times are displayed in {CONFERENCE_TIMEZONE}
217+
</span>
218+
</div>
206219
{Object.entries(concurrentSessionsGroup).map(
207220
([sessionDate, sessions], i, blocks) => {
208221
const blockEnd = sessions[0]?.event_end
@@ -225,7 +238,7 @@ export function ScheduleList({
225238
>
226239
<div className="mr-px flex flex-col max-lg:ml-px lg:flex-row">
227240
<div className="relative border-neu-50 bg-neu-50 dark:bg-neu-0 max-lg:-mx-px max-lg:my-px max-lg:border-x lg:mr-px">
228-
<span className="typography-body-sm mt-3 inline-block w-20 whitespace-nowrap pb-0.5 pl-4 lg:mr-6 lg:w-28 lg:pb-4 lg:pl-0">
241+
<span className="typography-body-sm mt-3 inline-block w-20 pb-0.5 pl-4 lg:mr-6 lg:w-28 lg:pb-4 lg:pl-0">
229242
{formatBlockTime(sessionDate, blockEnd)}
230243
</span>
231244
</div>

0 commit comments

Comments
 (0)