Skip to content

Commit 0f1b8d1

Browse files
Merge pull request #109 from strudel-science/bugfix/timezones
Add ability for timezone to be static for events
2 parents 8a72987 + 929aa14 commit 0f1b8d1

6 files changed

Lines changed: 13 additions & 5 deletions

File tree

content/engage/events/10-06-2025-learning-to-talk-with-your-users.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
---
22
title: 'Workshop: Learning to Talk with Your Users - User Experience Research for RSEs'
33
slug: '10-06-2025-learning-to-talk-with-your-users'
4-
date: 'Oct 6, 2025 10:30 AM EST'
4+
date: 'Oct 6, 2025 10:30 AM EDT'
5+
# Include timezone if you want the date to always display in that timezone
6+
# Otherwise the date will always display in the user's local timezone
7+
# The value should be a valid IANA timezone string
8+
# e.g. 'America/New_York', 'Europe/London', 'Asia/Tokyo'
9+
timezone: 'America/New_York'
510
speakers: ['Johanna Cohoon, Rajshree Deshmukh, and Mary Goldman']
611
upcoming: true
712
newsUrl: ' '

content/engage/events/10-23-2025-building-scientific-uis-with-strudel-and-ai-assistants.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: 'Workshop: Building Scientific UIs with STRUDEL and AI Assistants'
33
slug: '10-23-2025-building-scientific-uis-with-strudel-and-ai-assistants'
4-
date: 'Oct 23, 2025 9:00 AM PST'
4+
date: 'Oct 23, 2025 9:00 AM PDT'
55
speakers: ['STRUDEL team']
66
upcoming: true
77
newsUrl: ' '

gatsby-node.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ export const createPages: GatsbyNode["createPages"] = async ({
119119
title
120120
slug
121121
date
122+
timezone
122123
upcoming
123124
speakers
124125
format

src/components/layouts/EventLayout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const EventLayout: React.FC<PageProps<any, any>> = ({ pageContext, children }) =
5454
alignItems: 'center',
5555
}}
5656
>
57-
<span>{dayjs(pageContext.frontmatter.date).format('MMMM D, YYYY h:mm A z')}</span>
57+
<span>{dayjs(pageContext.frontmatter.date).tz(pageContext.frontmatter.timezone || undefined).format('MMMM D, YYYY h:mm A z')}</span>
5858
<CircleIcon sx={{ fontSize: '0.75rem' }} />
5959
<span>{pageContext.frontmatter.format}</span>
6060
</Stack>
@@ -120,7 +120,7 @@ const EventLayout: React.FC<PageProps<any, any>> = ({ pageContext, children }) =
120120
When:
121121
</Typography>
122122
<Typography>
123-
{dayjs(pageContext.frontmatter.date).format('MMMM D, YYYY H:mm A z')}
123+
{dayjs(pageContext.frontmatter.date).tz(pageContext.frontmatter.timezone || undefined).format('MMMM D, YYYY H:mm A z')}
124124
</Typography>
125125
</Stack>
126126
<Stack direction="row" spacing={1}>

src/pages/engage/events/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ const EventsPage: React.FC<PageProps<DataProps>> = ({ data }) => {
121121
</Box>
122122
<Stack direction="row" spacing={1}>
123123
<EventIcon />
124-
<Typography>{dayjs(event.frontmatter.date).format('MMMM D, YYYY h:mm A z')}</Typography>
124+
<Typography>{dayjs(event.frontmatter.date).tz(event.frontmatter.timezone || undefined).format('MMMM D, YYYY h:mm A z')}</Typography>
125125
</Stack>
126126
<Typography
127127
sx={{
@@ -234,6 +234,7 @@ export const query = graphql`
234234
title
235235
slug
236236
date
237+
timezone
237238
upcoming
238239
newsUrl
239240
speakers

src/types/strudel-config.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export interface EventFrontmatter {
5252
title: string;
5353
slug: string;
5454
date: string;
55+
timezone?: string;
5556
upcoming?: boolean;
5657
newsUrl?: string;
5758
speakers: string[];

0 commit comments

Comments
 (0)