Rain
08/29/2021, 8:31 AMRyan
08/30/2021, 5:50 AM09:00.Rain
08/30/2021, 7:16 AMnew Date(0,0,0,9,0) but the seed still stuck with Error. As work around I changed the type to string for now.
this is the sample code where it fail to create
await prisma.workingHour.create({
data: {
businessId: business.id,
opens: {
create: new Array(5).fill(1).map((v, idx) => {
return { day: idx + 1, startTime: new Date(0,0,0,9,0), endTime: new Date(0,0,0,18,0) };
}),
},
},
});Ryan
08/31/2021, 5:40 AMmodel User {
id Int @id @default(autoincrement())
time DateTime @db.Time(0)
}
And the query:
let date = new Date()
date.setHours(9)
date.setMinutes(0)
date.setSeconds(0)
await prisma.user.create({
data: {
time: date,
},
})
This is the output: