-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.kind/bugA reported bug.A reported bug.topic: @db.Timestampztopic: dates / DateTime
Description
Bug description
When passing ISO8601 strings with offset information, prisma throws an error.
How to reproduce
With a Prisma schema:
model Task {
startDate: DateTime @db.Timestampz
}A Zulu ISO8601 string works:
prisma.task.create({
data: {
startDate: "2021-09-28T22:00Z"
}
})A ISO8601 string doesn't
prisma.task.create({
data: {
startDate: "2021-09-29T00:00+02:00"
}
})with the error:
Error: Argument startDate: Got invalid value '2021-09-29T00:00+02:00' on prisma.createTask. Provided String, expected DateTime or Null.
Expected behavior
No response
Prisma information
model Task {
startDate: DateTime @db.Timestampz
}Environment & setup
- OS: mac os , m1 chip
- Database: PostgreSQL v13
- Node.js version: node 16
Prisma Version
v2.30.3
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.kind/bugA reported bug.A reported bug.topic: @db.Timestampztopic: dates / DateTime