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
barry3y ago
DATE type? DATETIME
Perfect
PerfectOP3y ago
@barry createDate TIMESTAMP default CURRENT_TIMESTAMP
Perfect
PerfectOP3y ago
This is what I have currently, it seems to be doing UTC but the docs say CURRENT_TIMESTAMP is "with timezone".
Perfect
PerfectOP3y ago
Perfect
PerfectOP3y 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