Re: 'NOW' in UTC with no timezone

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: 'NOW' in UTC with no timezone
Дата
Msg-id 20041015094333.GC14405@svana.org
обсуждение исходный текст
Ответ на Re: 'NOW' in UTC with no timezone  (jdolecek@NetBSD.org (Jaromir Dolecek))
Список pgsql-general
On Fri, Oct 15, 2004 at 06:48:40AM +0200, Jaromir Dolecek wrote:
> Stuart Bishop wrote:
> > Indeed - I was under the impression that the timezone would be preserved
> > (which is the case in the external datetime libraries I use), but I now
> > see that PostgreSQL will lose this information.
>
> Err - how come, lose?

It doesn't remember what timezone to gave when you entered the data. It
converts it to a date/time and displays it in your local timezone.

In other words, postgresql, treats the following as identical:

# select '2004-09-01 12:0:0 CEST'::timestamptz;
      timestamptz
------------------------
 2004-09-01 12:00:00+02
(1 row)

# select '2004-09-01 20:0:0 AEST'::timestamptz;
      timestamptz
------------------------
 2004-09-01 12:00:00+02
(1 row)

The answer is correct, but you're getting less out than you put in..

--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Вложения

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

Предыдущее
От: "Net Virtual Mailing Lists"
Дата:
Сообщение: Tsearch2 trigger firing...
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: Tsearch2 trigger firing...