I'm running following query from my JS code using pg
:
SELECT begin_at, to_char(begin_at, 'DD.MM') AS dt
FROM tasks
WHERE begin_at >= $1
ORDER BY begin_at
Column begin_at
has type timestamptz
.
On my PC I get dates in my timezone (UTC+4)
{ begin_at: "2021-11-02T19:00:00.000Z", dt: "03.11" }
and on server I get { begin_at: "2021-11-02T19:00:00.000Z", dt: "02.11" }
for the same database.
Both running node v16.8.0
, postgres 13
, both have same time and set postgres timezone to Asia/Yekaterinburg