From b44277506a831d738a732b69d3699ee900a15340 Mon Sep 17 00:00:00 2001 From: Christopher Mayor Date: Mon, 27 Apr 2026 11:35:02 -0700 Subject: [PATCH] fix: add withTimezone to session and verification expiresAt timestamps --- src/lib/db/schema.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/db/schema.ts b/src/lib/db/schema.ts index 4f2d723..f1592fa 100644 --- a/src/lib/db/schema.ts +++ b/src/lib/db/schema.ts @@ -42,7 +42,7 @@ export const verifications = pgTable("verifications", { id: text("id").primaryKey().$defaultFn(() => createId()), identifier: text("identifier").notNull(), value: text("value").notNull(), - expiresAt: timestamp("expires_at").notNull(), + expiresAt: timestamp("expires_at", { withTimezone: true }).notNull(), createdAt: timestamp("created_at", { withTimezone: true }).defaultNow(), updatedAt: timestamp("updated_at", { withTimezone: true }).defaultNow(), }); @@ -59,7 +59,7 @@ export const sessions = pgTable("sessions", { .notNull() .references(() => users.id, { onDelete: "cascade" }), token: text("token").notNull().unique(), - expiresAt: timestamp("expires_at").notNull(), + expiresAt: timestamp("expires_at", { withTimezone: true }).notNull(), ipAddress: text("ip_address"), userAgent: text("user_agent"), createdAt: timestamp("created_at", { withTimezone: true }).defaultNow().notNull(),