Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[GENERAL] pgAdmin III: timestamp displayed in what time zone?

5 views
Skip to first unread message

Fred Janon

unread,
Dec 14, 2009, 6:04:07 AM12/14/09
to
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

Adrian Klaver

unread,
Dec 14, 2009, 10:04:11 AM12/14/09
to

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
akl...@comcast.net

--
Sent via pgsql-general mailing list (pgsql-...@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

0 new messages