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

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: pgAdmin III: timestamp displayed in what time zone?
Дата
Msg-id 200912140704.11599.aklaver@comcast.net
обсуждение исходный текст
Ответ на pgAdmin III: timestamp displayed in what time zone?  (Fred Janon <fjanon@gmail.com>)
Список pgsql-general
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@comcast.net

В списке pgsql-general по дате отправления:

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: How to remove non-UTF values from a table?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Dependency tracking tool