Re: timestamp check - Mailing list pgsql-general

From Raymond O'Donnell
Subject Re: timestamp check
Date
Msg-id 55A3C69C.7010104@iol.ie
Whole thread Raw
In response to Re: timestamp check  (Ramesh T <rameshparnanditech@gmail.com>)
List pgsql-general
On 11/07/2015 17:11, Ramesh T wrote:
> okay,i'm executing a query from pgadmin3.
>
> i want display time with timezone.But above query  displaying date and
> time not timezone...
>
> On Sat, Jul 11, 2015 at 9:34 PM, David G. Johnston
> <david.g.johnston@gmail.com <mailto:david.g.johnston@gmail.com>> wrote:
>
>     On Fri, Jul 10, 2015 at 8:54 AM, Ramesh T
>     <rameshparnanditech@gmail.com
>     <mailto:rameshparnanditech@gmail.com>>wrote:
>
>
>         select
>         current_timestamp-to_timestamp(to_char(current_date,'YYYY-MM-DD
>         HH24'||':'||'MI'||':'||'SS')||' '||(SELECT utc_offset  FROM
>         pg_catalog.pg_timezone_names
>         WHERE name='US/Eastern'),'YYYY-MM-DD
>         HH24'||':'||'MI'||':'||'SS')::timestamptz;
>
>         it's not displaying timezone..any help..?

Hi there,

This question was answered a few days ago, but perhaps you didn't see
it. The reason you don't get timezone information is that subtracting
two timestamps results in an interval value. See table 9-27 on this page:

  http://www.postgresql.org/docs/9.4/static/functions-datetime.html

Also, please don't top-post; the convention on this list is to
bottom-post. Thanks! :-)

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: timestamp check
Next
From: Andreas Joseph Krogh
Date:
Subject: Obtaining advisory lock using ORDER BY