X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id BC6BE9DCB55 for ; Wed, 25 Jan 2006 18:16:00 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 87656-02 for ; Wed, 25 Jan 2006 18:16:01 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [131.203.101.226]) by postgresql.org (Postfix) with ESMTP id 66F3F9DCAEE for ; Wed, 25 Jan 2006 18:15:56 -0400 (AST) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.21]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1F1svm-0003Yg-4V; Thu, 26 Jan 2006 11:15:58 +1300 Message-ID: <43D7F89F.2070503@opencloud.com> Date: Wed, 25 Jan 2006 22:15:59 +0000 From: Oliver Jowett User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: lucas@marx.com.br CC: pgsql-jdbc@postgresql.org Subject: Re: Inserting the wrong date References: <91d5bf2c0601251045p5f5d5b6fp405c30b513cbdc6a@mail.gmail.com> In-Reply-To: <91d5bf2c0601251045p5f5d5b6fp405c30b513cbdc6a@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.112 required=5 tests=[AWL=0.112] X-Spam-Score: 0.112 X-Spam-Level: X-Archive-Number: 200601/119 X-Sequence-Number: 14570 Lucas Sanabio wrote: > Hi everyone! I'm having an problem when I try to insert data into a > timestamp field, let me try to explain what is going in on. > > I developed my application at my local machine and at this machine > everything is working as it should, but when I deployed the application > into the production server, every time I save an timestamp it saves it > one hour before. The method that is inserting the data is pasted below: What is the actual value inserted? I'd guess that your client and server timezone do not match, so that (for example) 2006-01-12 12:00:00 in the client's default timezone is 2006-01-12 12:00:00 +0100; if the server timezone is +0200 then this will be represented as 2006-01-12 13:00:00 +0200 (which is the same instant in time). If the actual value inserted is wrong, the first thing I would do is to try a recent driver as I did a number of time-and-date-related fixes relatively recently. What driver version are you currently using? -O