From: | Jair da Silva Ferreira Jr <j2(at)amazon(dot)com(dot)br> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: problem with dates when using a java calendar object with |
Date: | 2004-10-14 23:33:59 |
Message-ID: | 416F0CE7.2000203@amazon.com.br |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Hi Markus,
Markus Schaber wrote:
>Hi, Jair,
>
>On Wed, 13 Oct 2004 20:26:09 -0300
>Jair da Silva Ferreira Jr <j2(at)amazon(dot)com(dot)br> wrote:
>
>
>
>>Hi,
>> I am experiencing the following problem with postgresql: the date
>>value I insert into the database is different from the value I select
>>from the database. I use a Calendar with a non-default timezone to set
>>and get the date value (using methods
>>PreparedStatement.setDate(int,Date,Calendar) and
>>ResultSet.getDate(int,Calendar)).
>> Do you know how can I fix this problem? Am I doing anything wrong?
>>
>>
>
>Could you tell us how the table is defined? If you have it defined as
>"TIMESTAMP WITHOUT TIME ZONE", your dates always get converted to UTC
>and loose the time zone.
>
>
My test table definition is: create table date_test (d date)
As you can see it is a date type, so there's no time zone information on it.
Do you think that the date not having time zone information is the
source of the problem? If yes, what time zone should I use so that dates
are correctly inserted and selected? UTC time zone? The default JVM
timezone?
Thanks,
Jair Jr
>HTH,
>Markus
>
>
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Iain | 2004-10-15 01:15:34 | Re: tightening up on use of oid 0 |
Previous Message | Jair da Silva Ferreira Jr | 2004-10-14 23:33:37 | Re: problem with dates when using a java calendar object with |