Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Fix next run data for cron job not using UTC (#32592)

Joshen Limd6f7ab9a4478
diff --git a/apps/studio/components/interfaces/Integrations/CronJobs/CronJobs.utils.ts b/apps/studio/components/interfaces/Integrations/CronJobs/CronJobs.utils.ts
index 317bfed450d..1fe6de9099b 100644
--- a/apps/studio/components/interfaces/Integrations/CronJobs/CronJobs.utils.ts
+++ b/apps/studio/components/interfaces/Integrations/CronJobs/CronJobs.utils.ts
@@ -209,7 +209,7 @@ export const getNextRun = (schedule: string, lastRun?: string) => {
// (can't guarantee as scope is quite big)
if (schedule.includes('*')) {
try {
- const interval = parser.parseExpression(schedule)
+ const interval = parser.parseExpression(schedule, { tz: 'UTC' })
return interval.next().getTime()
} catch (error) {
return undefined