Hello! I am currently having some weird issues wi...
# orm-help
m
Hello! I am currently having some weird issues with timezones. Just for testing I created the following columns (using Postgres):
Copy code
testAt   DateTime
testTzAt DateTime @db.Timestamptz
From my understanding timestamp without timezone should store DateTime in the local time, but for what ever reason, when ever I save this, both of them get converted to UTC:
Copy code
testAt: '2021-06-24T01:16:14.963+02:00',
testTzAt: '2021-06-24T01:16:14.963+02:00',
When I read the selected row, this is what I get back:
Copy code
testAt: 2021-06-23T23:16:14.963Z,
testTzAt: 2021-06-23T23:16:14.963Z,
What am I doing wrong here, because currently I don't see any difference here. Thank you!
o
Let better knowers to correct me: I think I have read in prisma docs that it only stores in UTC
m
This is definitely wrong, I just used
INSERT INTO
query to save the same datetime and it saved it correctly (the
testAt
didn't convert to UTC automatically). I'll open up a github issue
Opened a github issue. If somebody has any input let me know in here: https://github.com/prisma/prisma/issues/7825