Code: Select all
CREATE TABLE public.test
(
a int,
UpdateDate timestamp NOT NULL DEFAULT ('now()')::timestamptz
);
INSERT INTO public.test (a) values (1);
SELECT *, NOW() FROM public.test;
Why the time differs by 7h? I believe that it is related to timezones somehow but ...a UpdateDate NOW
1 2016-09-23 05:14:14 2016-09-23 12:14:15