Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id E77809066CF for ; Thu, 7 Jun 2012 10:51:13 -0300 (ADT) Received: from nblzone-228-244.nblnetworks.fi ([83.145.228.244] helo=mist.reliabit.fi) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Scd7I-0003nQ-Hs for pgsql-bugs@postgresql.org; Thu, 07 Jun 2012 13:51:13 +0000 Received: from [10.10.0.52] (a88-112-43-44.elisa-laajakaista.fi [88.112.43.44]) by mist.reliabit.fi (Postfix) with ESMTPSA id 995F1164ED3 for ; Thu, 7 Jun 2012 16:50:58 +0300 (EEST) Message-ID: <4FD0B1C4.7040307@reliabit.fi> Date: Thu, 07 Jun 2012 16:51:00 +0300 From: =?ISO-8859-1?Q?Kasper_R=F6nning?= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: Issue when displaying TIMESTAMPTZ values Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201206/52 X-Sequence-Number: 33279 Hi, I seem to have found a bug in Postgres 9.1.3. Apparently timestamp=20 values are stored correctly in the database, but querying it returns=20 invalid results. My environment is Windows 7 64bit. The unexpected=20 result is that timestamps before 1st of May 1921 are displayed=20 incorrectly when time zone is 'Europe/Helsinki'. ----------------- [snip] ---------------------- SELECT version(); DROP TABLE IF EXISTS test2; CREATE TABLE test2 (ts TIMESTAMPTZ NOT NULL DEFAULT NOW()); INSERT INTO test2 VALUES ('1921-01-01 00:00:00+00'); INSERT INTO test2 VALUES ('1921-04-29 00:00:00+00'); INSERT INTO test2 VALUES ('1921-04-30 00:00:00+00'); INSERT INTO test2 VALUES ('1921-05-01 00:00:00+00'); INSERT INTO test2 VALUES ('1922-01-01 00:00:00+00'); INSERT INTO test2 VALUES ('1999-01-08 04:05:06 -8:00'); INSERT INTO test2 VALUES ('today allballs'); SET TIME ZONE EET; SELECT * FROM test2; -- ts -- ------------------------ -- 1921-01-01 02:00:00+02 -- 1921-04-29 02:00:00+02 -- 1921-04-30 02:00:00+02 -- 1921-05-01 02:00:00+02 -- 1922-01-01 02:00:00+02 -- 1999-01-08 14:05:06+02 -- 2012-06-07 03:00:00+03 -- (7 rows) SET TIME ZONE 'Europe/Helsinki'; SELECT * FROM test2; -- ts -- ------------------------------ -- 1921-01-01 01:39:52+01:39:52 -- 1921-04-29 01:39:52+01:39:52 -- 1921-04-30 01:39:52+01:39:52 -- 1921-05-01 02:00:00+02 -- 1922-01-01 02:00:00+02 -- 1999-01-08 14:05:06+02 -- 2012-06-07 03:00:00+03 -- (7 rows) ----------------- [snip] ---------------------- Best regards Kasper R=F6nning