Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 106BD6331DC for ; Fri, 13 Mar 2009 17:16:53 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 77990-03 for ; Fri, 13 Mar 2009 17:16:47 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 60DA5632718 for ; Fri, 13 Mar 2009 17:16:47 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id n2DKGZUc004748; Fri, 13 Mar 2009 16:16:35 -0400 (EDT) To: Roland Roberts cc: pgsql-jdbc@postgresql.org Subject: Re: ResultSet.getTimestamp(Calendar) off by one-hour In-reply-to: <49BAAE48.8050705@astrofoto.org> References: <49BA8D93.4010901@astrofoto.org> <49BAAE48.8050705@astrofoto.org> Comments: In-reply-to Roland Roberts message dated "Fri, 13 Mar 2009 15:04:40 -0400" Date: Fri, 13 Mar 2009 16:16:35 -0400 Message-ID: <4747.1236975395@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.017 tagged_above=0 required=5 tests=AWL=0.017 X-Spam-Level: X-Archive-Number: 200903/71 X-Sequence-Number: 19401 Roland Roberts writes: > And here is what is in the database: > roland=# select * from mytable; > id | mytime > ----+--------------------- > 12 | 2009-03-13 15:00:00 > (1 row) Apparently you're using a timestamp WITHOUT time zone column to store the data. Not recommended if you are worried about timezone effects, since by definition the apparent value depends on caller's timezone context. Use timestamp WITH time zone and see if it gets better. regards, tom lane