feat/40-reroll-on-disinterest #54

Merged
kenobi merged 73 commits from feat/40-reroll-on-disinterest into master 2023-11-19 20:24:36 +01:00
1 changed files with 3 additions and 3 deletions
Showing only changes of commit 0748097a1f - Show all commits

View File

@ -4,14 +4,14 @@ import { GuildScheduledEvent } from "discord.js";
import { logger } from "../logger";
import de from "date-fns/locale/de";
export function createDateStringFromEvent(event: GuildScheduledEvent, requestId: string, guildId?: string): string {
if (!event.scheduledStartAt) {
export function createDateStringFromEvent(eventStartDate:Date, requestId: string, guildId?: string): string {
if (!eventStartDate) {
logger.error("Event has no start. Cannot create dateString.", { guildId, requestId })
return `"habe keinen Startzeitpunkt ermitteln können"`
}
const timeZone = 'Europe/Berlin'
const zonedDateTime = utcToZonedTime(event.scheduledStartAt, timeZone)
const zonedDateTime = utcToZonedTime(eventStartDate, timeZone)
const time = format(zonedDateTime, "HH:mm", { locale: de })
if (isToday(zonedDateTime)) {