Search
Setup for Free
DT
Drizzle Team
•
2y ago
Vinny
How can I make my Postgres schema automatically insert `UTC` time when using `defaultNow()`?
The example below is inserting the time using the timezone of my computer instead of UTC
.
createdAt: timestamp('created_at').defaultNow(),
createdAt: timestamp('created_at').defaultNow(),
Drizzle Team
Join
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,794
Members
View on Discord
Similar Threads
Was this page helpful?
Yes
No
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
createdAt
:
timestamp
(
'created_at'
).
defaultNow
(),
createdAt
:
timestamp
(
'created_at'
).
defaultNow
(),
Similar Threads
Invalid default value when using defaultNow()
DT
Drizzle Team / help
3y ago
How can I make reusable columns then building schema?
DT
Drizzle Team / help
2y ago
Issue: INSERT automatically includes ALL schema columns, even when not provided in .values() Drizzle
DT
Drizzle Team / help
2mo ago
When I try to make a column unique, I am get weird error for defaultnow()
DT
Drizzle Team / help
3y ago