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