dates in sqlite not being evaluated, causing "Invalid Date"

Bbun4/1/2024
expiresAt: int("expires_at", { mode: "timestamp" })
.notNull()
.$defaultFn(() => new Date(Date.now() + 1000 * 60 * 60 * 24 * 365)),
createdAt: int("created_at", { mode: "timestamp" })
.notNull()
.default(sql`CURRENT_TIMESTAMP`),

expiresAt: int("expires_at", { mode: "timestamp" })
.notNull()
.$defaultFn(() => new Date(Date.now() + 1000 * 60 * 60 * 24 * 365)),
createdAt: int("created_at", { mode: "timestamp" })
.notNull()
.default(sql`CURRENT_TIMESTAMP`),

I have the following columns in my sqlite table, for some reason the expiresAt column works fine, when being read, its being evaluated as an actual date, and is saved in the database as an UNIX timestamp, however, the createdAt column is being saved as an actual ISO string date, but upon quering it shows INVALID DATE, why is it? Ok nice

Looking for more? Join the community!