1
1
"use client"
2
2
3
- import { format , parseISO , compareAsc } from "date-fns"
3
+ import { parseISO , compareAsc } from "date-fns"
4
4
import { ReactElement , useMemo , useState } from "react"
5
5
6
6
import { ScheduleSession } from "@/app/conf/_api/sched-types"
@@ -101,6 +101,10 @@ function getSessionsByDay(
101
101
}
102
102
}
103
103
104
+ /**
105
+ * September 8 in Amsterdam is Central European Summer Time
106
+ */
107
+ const CONFERENCE_TIMEZONE = "CEST"
104
108
const timeFormat = new Intl . DateTimeFormat ( undefined , {
105
109
hour : "2-digit" ,
106
110
minute : "2-digit" ,
@@ -197,12 +201,21 @@ export function ScheduleList({
197
201
key = { date }
198
202
className = "typography-body-sm bg-neu-200 pb-px dark:bg-neu-50"
199
203
>
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 >
206
219
{ Object . entries ( concurrentSessionsGroup ) . map (
207
220
( [ sessionDate , sessions ] , i , blocks ) => {
208
221
const blockEnd = sessions [ 0 ] ?. event_end
@@ -225,7 +238,7 @@ export function ScheduleList({
225
238
>
226
239
< div className = "mr-px flex flex-col max-lg:ml-px lg:flex-row" >
227
240
< 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" >
229
242
{ formatBlockTime ( sessionDate , blockEnd ) }
230
243
</ span >
231
244
</ div >
0 commit comments