ALWAYS USE TIMESTAMPTZ NOT USE TIMESTAMP IN POSTGRES.
SET timezone = ‘UTC’ IN pgsql/data/postgresql.conf.

timestamptz is accepted as an abbreviation for timestamp with time zone.

USE THIS:

1
2
3
4
5
6
7
8
CREATE TABLE IF NOT EXISTS users
(
id serial PRIMARY KEY,
mail text NOT NULL UNIQUE,
picture text,
create_time timestamptz default current_timestamp,
update_time timestamptz default current_timestamp
);

NOT THIS:

1
2
3
4
5
6
7
8
CREATE TABLE IF NOT EXISTS users
(
id serial PRIMARY KEY,
mail text NOT NULL UNIQUE,
picture text,
create_time timestamp default current_timestamp,
update_time timestamp default current_timestamp
);