© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•2y ago•
3 replies
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 TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Invalid default value when using defaultNow()
Drizzle TeamDTDrizzle Team / help
3y ago
How can I make reusable columns then building schema?
Drizzle TeamDTDrizzle Team / help
2y ago
Issue: INSERT automatically includes ALL schema columns, even when not provided in .values() Drizzle
Drizzle TeamDTDrizzle Team / help
4mo ago
When I try to make a column unique, I am get weird error for defaultnow()
Drizzle TeamDTDrizzle Team / help
3y ago