Re: pgAdmin III: timestamp displayed in what time zone?

From: Adrian Klaver <aklaver(at)comcast(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: pgAdmin III: timestamp displayed in what time zone?
Date: 2009-12-14 15:04:11
Message-ID: 200912140704.11599.aklaver@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers pgsql-general pgsql-hackers

On Monday 14 December 2009 3:04:07 am Fred Janon wrote:
> Hi,
>
> I am using Postgres 8.3. I have a table defined like this:
>
> =======================
> -- Table: timeson
>
> -- DROP TABLE timeson;
>
> CREATE TABLE timeson
> (
> id bigint NOT NULL,
> enddatetime timestamp without time zone NOT NULL,
> startdatetime timestamp without time zone NOT NULL,
> times_id bigint,
> CONSTRAINT timeson_pkey PRIMARY KEY (id),
> CONSTRAINT fkb1af5ba5890cf3da FOREIGN KEY (times_id)
> REFERENCES times (id) MATCH SIMPLE
> ON UPDATE NO ACTION ON DELETE NO ACTION
> )
> WITH (OIDS=FALSE);
> ALTER TABLE timeson OWNER TO myfreo;
>
> ======================
> I populate the table with some data and use pgAdmin III 1.8.4 to view the
> date "View date> first top100 rows". the question is: in what timezone are
> the fields showed in pgAdmin? no timezone (as stored), the server time zone
> or the time zone of the computer where pgAdmin runs?
>
> Thanks
>
> Fred

For display purposes it has no time zone value, so it is just a literal value.

For calculation purposes per the docs:

http://www.postgresql.org/docs/8.4/interactive/datatype-datetime.html

"Conversions between timestamp without time zone and timestamp with time zone
normally assume that the timestamp without time zone value should be taken or
given as timezone local time. A different time zone can be specified for the
conversion using AT TIME ZONE. "

--
Adrian Klaver
aklaver(at)comcast(dot)net

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Ian Barwick 2009-12-14 15:07:24 Re: unpleasant characters
Previous Message Dave Page 2009-12-14 14:56:28 Re: pgAdmin3 icon

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-12-14 15:09:21 Re: Dependency tracking tool
Previous Message Alban Hertroys 2009-12-14 14:44:22 Re: How to remove non-UTF values from a table?

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-12-14 15:04:55 Re: Row-Level Security
Previous Message Tom Lane 2009-12-14 15:01:16 Re: Range types