From: Oliver Jowett <oliver@opencloud.com>
To: lucas@marx.com.br
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Inserting the wrong date
Date: Wed, 25 Jan 2006 22:15:59 +0000
Message-ID: <43D7F89F.2070503@opencloud.com> (raw)
In-Reply-To: <91d5bf2c0601251045p5f5d5b6fp405c30b513cbdc6a@mail.gmail.com>
References: <91d5bf2c0601251045p5f5d5b6fp405c30b513cbdc6a@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: oliver@opencloud.com, lucas@marx.com.br
Subject: Re: Inserting the wrong date
In-Reply-To: <43D7F89F.2070503@opencloud.com>
References: <91d5bf2c0601251045p5f5d5b6fp405c30b513cbdc6a@mail.gmail.com> <43D7F89F.2070503@opencloud.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox