Bug #695: Wrong Timezone offset (like bug#672)

Поиск
Список
Период
Сортировка
От pgsql-bugs@postgresql.org
Тема Bug #695: Wrong Timezone offset (like bug#672)
Дата
Msg-id 20020624073339.19B1F475C1E@postgresql.org
обсуждение исходный текст
Ответы Re: Bug #695: Wrong Timezone offset (like bug#672)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
N. Fung (php-jp@typhoon.co.jp) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
Wrong Timezone offset (like bug#672)

Long Description
function datetime() and extract() returns wrong timezone offset values.  This is present in v7.2.1 but NOT in v7.0.3:

In v7.0.3:

% perl -le 'print time ;'
1024903188
% psql template1
Welcome to psql, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

template1=# select datetime(1024903188) \g
       timestamp
------------------------
 2002-06-24 16:19:48+09
(1 row)

template1-# \q
% date
Mon Jun 24 16:20:17 JST 2002

In v7.2.1:

perl -le 'print time'
1024903424
% psql template1
Welcome to psql, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

template1=# select datetime(1024903424) \g
      timestamp
---------------------
 2002-06-23 22:23:44
(1 row)

template1=# \q
% date
Mon Jun 24 16:24:12 JST 2002

% psql template1
Welcome to psql, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

template1=# select now() \g
             now
------------------------------
 2002-06-24 16:30:09.99867+09
(1 row)

template1=# select extract(timezone_hour from now()) \g
 date_part
-----------
        -9
(1 row)

---

Although I am in JST (UTC+9) postgresql is telling me the I'm UTC-9.

--end of report---



Sample Code


No file was uploaded with this report

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Patch for memory leaks in index scan
Следующее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: Bug #696: timestamp function does not work?