From: Scott Carr <kscarr73@gmail.com>
To: Dave Cramer <pg@fastcrypt.com>
To: pravdas <pdas77@gmail.com>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: Timestamp issue from ojdbc5 & ojdbc6
Date: Fri, 06 Dec 2013 15:25:58 -0600
Message-ID: <52A240E6.8000409@gmail.com> (raw)
In-Reply-To: <CADK3HHLieq=wwLaawEsSqHaXBJQOsUGRhO0a+rPUJgad4H9cOQ@mail.gmail.com>
References: <1386228826869-5781795.post@n5.nabble.com>
<CADK3HHLieq=wwLaawEsSqHaXBJQOsUGRhO0a+rPUJgad4H9cOQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
ojdbc14 is a jar from Oracle.
(Hey I actually answered something on the list. ;-)
On 12/05/2013 10:56 AM, Dave Cramer wrote:
> What is an ojdbc14 jar ?
>
> Dave Cramer
>
> dave.cramer(at)credativ(dot)ca
> http://www.credativ.ca
>
>
> On Thu, Dec 5, 2013 at 2:33 AM, pravdas <pdas77@gmail.com
> <mailto:pdas77@gmail.com>> wrote:
>
> JVM Timezone details :India Standard TimeAsia/Calcutta019800000
> DB Timezone details :Central Standard
> TimeAmerica/Chicago3600000-21600000
>
> String sql = "select systimestamp as base from dual";
> .....
> PreparedStatement stmt = con.prepareStatement(sql);
> ResultSet rs = stmt.executeQuery();
> while(rs.next()) {
> System.out.println(rs.getTimestamp("base"));
> System.out.println(rs.getString("base"));
> }
>
> Test-1:
> I tested using ojdbc14.jar 10.1.0.3.0 with, it works as expected
> printing
> the db time
>
> Output:
> 2013-12-05 01:23:57.141583
> 2013-12-5 1.23.57.141583000 -6:0
>
> Test-2:
> I tested using ojdbc5.jar & ojdbc6.jar 11.2.0.3.0 with,
> getTimestamp print
> local time where as getString prints db time.
>
> Output:
> 2013-12-05 12:57:54.3508
> 2013-12-05 01:27:54.3508 -6:00
>
> Please suggest what is wrong with Test-2 ojdbc driver version
> 11.2.0.3.0
> where the getTimestamp() prints local time. My application expect
> the db
> time like Test-1 in the getTimestamp().
>
>
>
>
>
> --
> View this message in context:
> http://postgresql.1045698.n5.nabble.com/Timestamp-issue-from-ojdbc5-ojdbc6-tp5781795.html
> Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org
> <mailto:pgsql-jdbc@postgresql.org>)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>
>
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: kscarr73@gmail.com, pg@fastcrypt.com, pdas77@gmail.com
Subject: Re: Timestamp issue from ojdbc5 & ojdbc6
In-Reply-To: <52A240E6.8000409@gmail.com>
References: <1386228826869-5781795.post@n5.nabble.com> <CADK3HHLieq=wwLaawEsSqHaXBJQOsUGRhO0a+rPUJgad4H9cOQ@mail.gmail.com> <52A240E6.8000409@gmail.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