-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: timestamps are not stored as UTC when using drizzle and postgres #1863
Labels
Comments
szamanr
changed the title
bug: timestamps are not stored as UTC
bug: timestamps are not stored as UTC when using drizzle
May 1, 2024
szamanr
changed the title
bug: timestamps are not stored as UTC when using drizzle
bug: timestamps are not stored as UTC when using drizzle and postgres
May 1, 2024
https://github.com/drizzle-team/drizzle-orm/releases/tag/0.30.0
EDIT: after upgrading drizzle, the issue still occurs. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Provide environment information
Describe the bug
using the auto-generated app with drizzle and postgres, when i create a post at 9:00 CEST (7:00 UTC), and inspect the database, the
created_at
timestamp actually shows05:00:xx.xxxZ
, so 2 hours before UTC. same thing for theupdatedAt
field (after adding api to update posts).changing the drizzle data type to include timezone fixes the issue:
timestamp("created_at", { withTimezone: true })
Reproduction repo
To reproduce
Additional information
No response
The text was updated successfully, but these errors were encountered: