I have the createdAt and updatedAt properties in my entities inside my PostgreSQL database.
Every time Prisma returns these properties, the values are being formatted to ISOString and it removes the timezone.
I haven’t found a way to return the date in the proper timezone and don’t want to create a mapper for each entity, because it will cost a lot of changes. Can Prisma the DateTime return in the Brazil(UTC -3) timezone?
model User {
id String @id @default(uuid())
createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz()
updatedAt DateTime @default(now()) @updatedAt @map("updated_at") @db.Timestamptz()
roleValue String @map("role_value")
name String
access Access?
role Role @relation(fields: [roleValue], references: [value])
@@map("users")
}
Stored users in databasa PostgreSQL
Prisma findMany Return