From e10dfe8f8ab644c05a7bd4fbfb2bc17683e8dfdc Mon Sep 17 00:00:00 2001 From: machadovilaca Date: Tue, 5 May 2026 11:57:52 +0100 Subject: [PATCH] fix(frontend): parse cron expressions as UTC for next run calculation cron-parser defaults to the local timezone, causing the "Next 3 runs" preview to show incorrect UTC times for users outside UTC. Co-Authored-By: Claude Opus 4.6 --- components/frontend/src/lib/cron.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/frontend/src/lib/cron.ts b/components/frontend/src/lib/cron.ts index e0f3731ac..19a1ae3f1 100644 --- a/components/frontend/src/lib/cron.ts +++ b/components/frontend/src/lib/cron.ts @@ -19,7 +19,7 @@ export function getCronDescription(cronExpr: string): string { */ export function getNextRuns(cronExpr: string, count: number): Date[] { try { - const interval = CronExpressionParser.parse(cronExpr); + const interval = CronExpressionParser.parse(cronExpr, { tz: "UTC" }); const dates: Date[] = []; for (let i = 0; i < count; i++) { dates.push(interval.next().toDate());