Skip to content

Commit

Permalink
simplifying timezone fuckaround
Browse files Browse the repository at this point in the history
  • Loading branch information
amykapernick committed Mar 5, 2024
1 parent 180d787 commit f21ea46
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/components/parts/runsheet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ const Runsheet = (props: RunsheetProps) =>
{
const day = format(add(event.start, { hours: 8 }), 'EEEE, dd MMM')
if (!days[day]) days[day] = []
days[day].push(event)
days[day].push({
...event,
start: add(event.start, { hours: 8 }),
end: event.end ? add(event.end, { hours: 8 }) : null
})
})

return (
Expand Down Expand Up @@ -58,8 +62,8 @@ const Runsheet = (props: RunsheetProps) =>
<tbody>
{events.map((event: RunsheetEvent) => (
<tr key={event.name}>
<td>{format(add(event.start, { hours: 8 }), 'h:mm aaa')}</td>
<td>{event?.end && format(add(event.end, { hours: 8 }), 'hh:mm aaa')}</td>
<td>{format(event.start, 'h:mm aaa')}</td>
<td>{event?.end && format(event.end, 'hh:mm aaa')}</td>
<td>{event.name}</td>
<td><small>{event?.notes}</small></td>
<td className="no-print">
Expand Down

0 comments on commit f21ea46

Please sign in to comment.