pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Markus Schaber <schabios@logi-track.com>
To: Jair da Silva Ferreira Jr <j2@amazon.com.br>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: problem with dates when using a java calendar object
Date: Thu, 14 Oct 2004 10:02:01 +0200
Message-ID: <20041014100201.761efae5@kingfisher.intern.logi-track.com> (raw)
In-Reply-To: <416DB991.3060809@amazon.com.br>
References: <416DB991.3060809@amazon.com.br>

Hi, Jair,

On Wed, 13 Oct 2004 20:26:09 -0300
Jair da Silva Ferreira Jr <j2@amazon.com.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.

HTH,
Markus



-- 
markus schaber | dipl. informatiker
logi-track ag | rennweg 14-16 | ch 8001 zürich
phone +41-43-888 62 52 | fax +41-43-888 62 53
mailto:schabios@logi-track.com | www.logi-track.com



view thread (10+ messages)  latest in thread

Message-ID: <20041014100201.761efae5@kingfisher.intern.logi-track.com>
Permalink:  ../20041014100201.761efae5@kingfisher.intern.logi-track.com/
Also on:    postgresql.org/message-id/20041014100201.761efae5@kingfisher.intern.logi-track.com

 · 

reply

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: schabios@logi-track.com, j2@amazon.com.br
  Subject: Re: problem with dates when using a java calendar object
  In-Reply-To: <20041014100201.761efae5@kingfisher.intern.logi-track.com>
  References: <416DB991.3060809@amazon.com.br> <20041014100201.761efae5@kingfisher.intern.logi-track.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