BUG #6385: extract epoch at timezone returns wrong value

Поиск
Список
Период
Сортировка
От sreeraj@ordyn.com
Тема BUG #6385: extract epoch at timezone returns wrong value
Дата
Msg-id E1RjEFk-0007oL-OF@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #6385: extract epoch at timezone returns wrong value  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      6385
Logged by:          Sreeraj S
Email address:      sreeraj@ordyn.com
PostgreSQL version: 9.1.2
Operating system:   Windows Vista Professional
Description:=20=20=20=20=20=20=20=20

Below is given psql output - I am in timezone UTC+05:30 (India) as shown by
select now() output below.

When I give "SELECT extract(epoch from now() );" the output is
1325872658.xxx=20

I would expect a slightly incremented value when after a few seconds I give
the command "SELECT extract(epoch from now() at time zone 'utc+05:30');" .
Nut I get the value 1325833067.xxx which is the value for utc-05:30 !!!

And when I give "SELECT extract(epoch from now() at time zone
'utc-05:30');", I get 1325872672.xxx which is what is expected if I
specified timezone +05:30 !!!

-----  psql extract below  ------

ordprdlic=3D> select now();
              now
-------------------------------
 2012-01-06 23:27:35.663+05:30
(1 row)


ordprdlic=3D> SELECT extract(epoch from now() );
   date_part
----------------
 1325872658.608
(1 row)


ordprdlic=3D> SELECT extract(epoch from now() at time zone 'utc+05:30');
   date_part
----------------
 1325833067.073
(1 row)


ordprdlic=3D> SELECT extract(epoch from now() at time zone 'utc-05:30');
   date_part
----------------
 1325872672.977
(1 row)

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

Предыдущее
От: golodnew@mail.ru
Дата:
Сообщение: BUG #6387: eror
Следующее
От: max.kunz@atip.de
Дата:
Сообщение: BUG #6386: PITR never find a consistent recovery point