Storing Date and Time in UTC on PostgreSQL DB

How do you guys go about this? The docs are not making much sense to me. I am NOT using prisma.
5 Replies
barry
barry2y ago
DATE type? DATETIME
Perfect
Perfect2y ago
@barry createDate TIMESTAMP default CURRENT_TIMESTAMP
Perfect
Perfect2y ago
This is what I have currently, it seems to be doing UTC but the docs say CURRENT_TIMESTAMP is "with timezone".
Perfect
Perfect2y ago
Perfect
Perfect2y ago
CURRENT_TIMESTAMP appears to do what I want, but it depends on the timezone of the machine postgres is running on apparently? Not sure why I am finding this so hard lol
Want results from more Discord servers?
Add your server