Re: Problem with Timestamp

Lists: pgsql-general
From: boff <bglauber(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Problem with Timestamp
Date: 2006-01-18 22:40:02
Message-ID: 8287e8650601181440s3983c54ek6d9a041187c14c80@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi.. I'm having some problems with Timestamp.

I have a TIMESTAMP WITH TIME ZONE field called 'time' in my table. The value
of this field will be given by the "java.sql.Timestamp" in my application.
When I store this value in the table it's correct, but when I make a SELECT
in this field and take it using the getTimestamp( ) method from JAVA, the
value wich is returned is not that one which is stored in the database: the
value which is returned does not contain the timezone code. So, I can't use
this value, which is incorrect. It can be any conversion of types, I think.

I thought it could be any problem with JDBC, but I put the last version and
nothing has changed.

What could it be?? I've spent hours looking for anything that could help me
but I haven't found.

Thanks
Glauber


From: vishal saberwal <vishalsaberwal(at)gmail(dot)com>
To: boff <bglauber(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problem with Timestamp
Date: 2006-01-18 23:51:03
Message-ID: 3e74dc250601181551v748c3677t664c79cc295cd93a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

hi,
though i dont use JDBC, i was just interested and found some links (which
may be helpful) ...

http://archives.postgresql.org/pgsql-bugs/2004-02/msg00028.php

http://72.14.203.104/search?q=cache:ptQFfXTM0pgJ:snaga.org/pgsql/cvsweb.cgi/pgsql/src/interfaces/jdbc/org/postgresql/test/jdbc2/TimestampTest.java%3Frev%3D1.1.1.2+postgres+getTimestamp(+time+zone&hl=en&client=firefox-a

http://www.nabble.com/Re:-Timestamp-Conversion-Woes-Redux-p460930.html

thanks,
vish

On 1/18/06, boff <bglauber(at)gmail(dot)com> wrote:
>
>
> Hi.. I'm having some problems with Timestamp.
>
> I have a TIMESTAMP WITH TIME ZONE field called 'time' in my table. The
> value of this field will be given by the "java.sql.Timestamp" in my
> application.
> When I store this value in the table it's correct, but when I make a
> SELECT in this field and take it using the getTimestamp( ) method from JAVA,
> the value wich is returned is not that one which is stored in the database:
> the value which is returned does not contain the timezone code. So, I can't
> use this value, which is incorrect. It can be any conversion of types, I
> think.
>
> I thought it could be any problem with JDBC, but I put the last version
> and nothing has changed.
>
> What could it be?? I've spent hours looking for anything that could help
> me but I haven't found.
>
>
> Thanks
> Glauber
>