From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | "op12om(at)yahoo(dot)co(dot)in" <op12om(at)yahoo(dot)co(dot)in>, Postgres General <pgsql-general(at)postgresql(dot)org>, Postgres List <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Getting wrong time using now() |
Date: | 2019-02-12 23:40:50 |
Message-ID: | 187833af-6e2d-e84a-da49-62d6da8b2ccc@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-sql |
On 2/12/19 3:36 PM, Om Prakash Jaiswal wrote:
> Create table service_record(Id into, time timestamp without time zone
> default now()).
> Postgresql version 9.6.6, RHEL7.6 , when I am executing the query. I am
> getting time 5:30hours behind current time. Please solve it
Move clock back 5:30 hours:).
On serious note:
1) I would change the time field to timestamp with timezone.
2) Verify what timezone the server is running on:
show timezone;
TimeZone
------------
US/Pacific
>
>
> Regards
> Om Prakash
> Bangalore, India
>
> Sent from Yahoo Mail on Android
> <https://go.onelink.me/107872968?pid=InProduct&c=Global_Internal_YGrowth_AndroidEmailSig__AndroidUsers&af_wl=ym&af_sub1=Internal&af_sub2=Global_YGrowth&af_sub3=EmailSignature>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2019-02-12 23:46:47 | Re: Getting wrong time using now() |
Previous Message | Ken Tanzer | 2019-02-12 23:38:26 | Re: Subquery to select max(date) value |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2019-02-12 23:46:47 | Re: Getting wrong time using now() |
Previous Message | Om Prakash Jaiswal | 2019-02-12 23:36:06 | Getting wrong time using now() |