The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.
TypeScript budget-trackercollaborativedockeritinerarymcp-serveroffline-firstopen-sourceopenstreetmappacking-listpwareal-timeself-hostedselfhostedtraveltravel-apptravel-journaltravel-plannertripitwanderlog
fix(ical): pad datetime to 15 chars for valid iCal DTSTART/DTEND format
Maurice94b74f96a3fa
diff --git a/server/src/services/tripService.ts b/server/src/services/tripService.tsindex 9afd7f290..e5d4e27d1 100644--- a/server/src/services/tripService.ts+++ b/server/src/services/tripService.ts@@ -366,8 +366,13 @@ export function exportICS(tripId: string | number): { ics: string; filename: strconst uid = (id: number, type: string) => `trek-${type}-${id}@trek`;// Format datetime: handles full ISO "2026-03-30T09:00" and time-only "10:00"+ // iCal requires exactly YYYYMMDDTHHMMSS formatconst fmtDateTime = (d: string, refDate?: string) => {- if (d.includes('T')) return d.replace(/[-:]/g, '').split('.')[0];+ if (d.includes('T')) {+ const raw = d.replace(/[-:]/g, '').split('.')[0];+ // Pad to 15 chars (YYYYMMDDTHHMMSS) — add missing seconds+ return raw.length === 13 ? raw + '00' : raw;+ }// Time-only: combine with reference dateif (refDate && d.match(/^\d{2}:\d{2}/)) {const datePart = refDate.split('T')[0];