How do I convert a Unix timestamp (or epoch time) to a PostgreSQL timestamp without time zone
?
For example, 1481294792
should convert to 2016-12-09 14:46:32
.
I tried SELECT to_timestamp(1481294792)::timestamp
, but that gives me 2016-12-09 09:46:32
.
SELECT to_timestamp(1481294792) AT TIME ZONE 'UTC';
Source: https://dba.stackexchange.com/a/61345/33877
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With