Skip to content

Commit

Permalink
Update event time and fix displayed time by parsing as UTC
Browse files Browse the repository at this point in the history
  • Loading branch information
Freymaurer committed Oct 30, 2024
1 parent 999dab0 commit 1bbd677
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/content/events/2024-10-21_HandsOn-FAIR-RDM.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ title: Hands-on Workshop on FAIR Data Management Using ARCs
category: Training
description: "The workshop covers the fundamentals of research data management and the principles of FAIR data."
when:
start: 2024-10-21T09:30:00
end: 2024-10-23T15:00:00
start: 2024-10-21T09:00:00
end: 2024-10-23T16:00:00
mode: OnlineEventAttendanceMode
tutors:
- Bianca Laker
Expand Down
4 changes: 2 additions & 2 deletions src/util/EventUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function getHumanReadableAttendanceMode(mode: 'OfflineEventAttendanceMode
}
}

export const formatterDate = new Intl.DateTimeFormat('de-DE', { timeZone: 'Europe/Berlin', day: "2-digit", month: "2-digit", year: "numeric"});
export const formatterDate = new Intl.DateTimeFormat('de-DE', { timeZone: 'UTC', day: "2-digit", month: "2-digit", year: "numeric"});
export function formatDateToHref(date: Date): string {
return formatterDate
.formatToParts(date)
Expand All @@ -29,7 +29,7 @@ export function formatDateToHref(date: Date): string {
}

// const formatterDate = new Intl.DateTimeFormat('en-US', { day: '2-digit', month: '2-digit', year: 'numeric' });
export const formatterTime = new Intl.DateTimeFormat('de-DE', { timeZone: 'Europe/Berlin', hour: '2-digit', minute: '2-digit' });
export const formatterTime = new Intl.DateTimeFormat('de-DE', { timeZone: 'UTC', hour: '2-digit', minute: '2-digit' });

// Extend the type by adding the `periodic` flag
export type ReducedEvent = CollectionEntry<'events'> & {
Expand Down

0 comments on commit 1bbd677

Please sign in to comment.