Re: [ADMIN] Messed up time zones

Поиск
Список
Период
Сортировка
От Laszlo Nagy
Тема Re: [ADMIN] Messed up time zones
Дата
Msg-id 501C0884.1040106@shopzeus.com
обсуждение исходный текст
Ответы Re: [ADMIN] Messed up time zones  (Steve Crawford <scrawford@pinpointresearch.com>)
Список pgsql-performance
> All the above are the exact same point in time merely stated as
> relevant to each location. Note that given a timestamp with time zone
> and a zone, PostgreSQL returns a timestamp without time zone (you know
> the zone since you specified it).
Yes, I know the zone. But I don't know the offset from UTC.

Example:

template1=> set timezone to 'UTC';
SET
template1=> select ('2011-10-30 01:00:00'::timestamptz) at time zone
'Europe/Budapest';
       timezone
---------------------
  2011-10-30 02:00:00    -- Is it winter or summer time?
(1 row)

template1=> select ('2011-10-30 00:00:00'::timestamptz) at time zone
'Europe/Budapest';
       timezone
---------------------
  2011-10-30 02:00:00    -- Is it winter or summer time? What is the
offset from UTC here? Can you tell me when it was in UTC?
(1 row)

template1=>

What is more:

template1=> select (('2011-10-30 00:00:00'::timestamptz) at time zone
'Europe/Budapest') is distinct from (('2011-10-30
01:00:00'::timestamptz) at time zone 'Europe/Budapest');
  ?column?
----------
  f
(1 row)

template1=>

Yeah, we know what time zone it is in, but we don't know when it was,
thanks a lot. :-( It would be unambiguous to store the UTC offset along
with the value. But it is not how it was implemented.

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

Предыдущее
От: roberthanco@o2.pl
Дата:
Сообщение: Postgresql - performance of using array in big database
Следующее
От: Steve Crawford
Дата:
Сообщение: Re: [ADMIN] Messed up time zones